View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Condition for worksheet reference

Think IF(ISERROR(..) could be used

Try it in this manner:
=IF(L2="","",IF(ISERROR(INDIRECT("'"&L2&"'!B"&ROW( $A$2))),"",INDIRECT("'"&L2&"'!B"&ROW($A$2))))
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:20,500 Files:363 Subscribers:64
xdemechanik
---
"JBoyer" wrote:
This is the function I currently have:
=IF(L2<"",INDIRECT("'"&L2&"'!B"&ROW($A$2)),"")

I want to modify it in the following way....
=IF(L2<"", {IF STATEMENT} INDIRECT("'"&L2&"'!B"&ROW($A$2)),"")

I want to add another if statement where shown above to check if there is a
sheet called '"&L2&'"! . So basically IF('"&L2&'"! EXISTS, TRUE, FALSE)

Thanks in advance for any help!