View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Steve[_4_] Steve[_4_] is offline
external usenet poster
 
Posts: 184
Default ActiveSheet in formula

Hi All,

I have the following formula in vba:

..Formula = "=COUNTIFS('[" & strName & "]Sheet1'!$E:$E,A2,'[" & strName & "]Sheet1'!$H:$H,""0"")"

The file I am referencing via the variable strName only has one sheet...but what I am finding is that the sheet name is not always Sheet1. How can I modify the formula to select the only sheet in the workbook?

Thanks!