View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
OssieMac OssieMac is offline
external usenet poster
 
Posts: 2,510
Default Function With Lookup

Hi Dias,

The other posts here are correct in saying that you should include the
single apostrophes around the sheet name as in the formula below in case you
have a space in the sheet name and as Dave says "they don't hurt if they're
not necessary."

Anyway the following will test for data in B1 and if blank then the formula
returns a blank.

=IF(B1 = "","",INDIRECT("'"&B1&"'!A1"))


--
Regards,

OssieMac


"Dias" wrote:

Hi
Thank you for the help.
To finish my project I only need a little thing.
Wen the cells in column B are empty I get #Ref Error,how do I take this
out.
Regards
Dias

OssieMac escreveu:
Hi Dias,

If I understand your question correctoly then you should be able to use the
following.

=INDIRECT(B1&"!"&"A1")