View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Sam Wilson Sam Wilson is offline
external usenet poster
 
Posts: 523
Default Lookup where target worksheet may vary

If A1 contained "REGR" or another sheetname:

=HLOOKUP(TCI_TestCycle,INDIRECT("[TestGroups.xls]" & A1 & "!Group"),5,FALSE)

"Nigel Barton" wrote:

I have a formula, similar to one below, that I want to use in many workbooks:

=HLOOKUP(TCI_TestCycle,[TestGroups.xls]REGR!Group,5,FALSE)

The worksheet REGR however will change. Sometimes it will have other values
depending on the workbook in which the formula is used. These worksheets are
in a separate workbook.

How, instead of the string REGR, can I insert a value from another cell in
the workbook?

Thanks,
--
Nigel Barton