File name extension

S

Sleepy

Would anyone know how to reference a particular tab name at the end of a file extension.

e.g. file name = workbook 1
worksheet name = tab 1 (in workbook 1)


therefore C:\worbook 1\tab 1.xls or something of that nature.
 
B

Bernie Deitrick

Sleepy,

In VBA it would be

Workbooks("workbook 1.xls").Worksheets("tab 1")

In a formula, if workbook 1 is open, and you want to reference the value in
cell A1:
='[workbook 1.xls]tab 1'!$A$1

if workbook 1 is closed:
='C:\Foldername\[workbook 1.xls]tab 1'!$A$1

HTH,
Bernie
MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top