I would like to use the following formula:
=SUM(COUNTIF(INDIRECT({"'ABC'!8:8","'ABC'!17:17","'ABC'!26:26","'ABC'!35:35","'ABC'!44:44"}),'CBA'!A5))
Where ABC is worksheet 1 and CBA is worksheet 2, and the formula is used in cell C5. Currently, the 'CBA'!A5 portion just tells the formula what to look for in the fields listed prior, but it only works for what is in cell A5 (obviously), and I would like to sort the rows based on another column which would change what is in cell A5. I would like it to automatically change what cell it references to when I go down the column. For example, if I was putting the same formula in cell C11, I would like it to pull the info from A11 instead of A5.
Is there any way to do this? I'm hoping there's just a different way to write that single 'CBA'!A5 portion of the code.
Thanks
Bookmarks