In excel 2007, I have a formula in a cell like the following:
=COUNTIFS('2008-10-31'!$C:$C;">="&'$A7)
Now I want to make the name of the sheet ('2008-10-31') be dependent on the value of some cell (say A1). Something like:
=COUNTIFS(A1!$C:$C;">="&'$A7) // error
Is there is way to do this? Or do I have to write a VBA-Macro for it?
INDIRECT formula to dynamically refer to another worksheet Let's break apart the formula you see in the screenshot and understand. As you know, the usual way to reference another sheet in Excel is writing the sheet's name followed by the exclamation mark and a cell / range reference, like SheetName!
INDIRECT does what you want. Note that if the sheet name has any spaces, you need to put single quotes round it, ie
=COUNTIFS(INDIRECT("'" & A1 & "'!$C:$C"); ">=" & $A7)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With