View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default retrieving data from variable workbooks

Try this

Sub stance()
Path = "C:\" 'change to suit
fnam = Sheets("Sheet1").Range("B1").Value & ".xls"
Workbooks.Open Filename:=(Path & fnam)
End Sub

With (say) June in B1 this will open a workbook called June.xls in the root
of C

Mike

"lutan" wrote:

Hi,

I am trying to retrive data from variable workbooks based on the value of a
cell contained in the receiving workbook for example

Cell B1 contains the text "June"
I would like to return values from the workbook saved in C:\.....\june.xls
and extrapolating on that if I enter August in B1 I want to retrieve data
from C:\....\August.xls

Any help would be greatly appreciated

Thanks in advance