Hi everyone,
I'm trying to set up a column of cells on a sheet which reference a cell in the exact same row of another sheet whenever a condition is met (e.g., on row 5 of Sheet 1, if Condition Y is met, the cell will display a result from row 5 of Sheet Y). There are multiple sheets to choose from, so I'm using an array with multiple conditions, which looks like this:
=IF(INDIRECT(“S”&ROW())="XXX",INDIRECT("XXX!$C$"&ROW()),IF(INDIRECT(“S”&ROW())="XXY",INDIRECT("XXY!$C$"&ROW()),IF(INDIRECT(“S”&ROW())="XYY",INDIRECT("XYY!$C$"&ROW()), etc.
So basically it chooses the sheet based on the contents of another cell in the same row and then cites cell C from the same row on the selected sheet. It seems good in theory, and if I just type out one of the IF conditions on its own, it works perfectly fine, but as soon as I plug these values into the array it goes haywire and I get a #NAME? error. I have no idea why this is happening. The IF array itself is apparently fine, as I'm using an identical one with different true values in another cell and it functions perfectly, but it just doesn't seem to want to accept these INDIRECT references to the other sheets for some reason.
There aren't any spaces in the sheet names, so I don't need the single quotation marks around them. (I tried adding them to no avail.)
I don't know what the problem is and I'd very much appreciate any help.
Bookmarks