Forum Discussion
Referring to data in another sheet within the INDIRECT function.
- Sep 19, 2022
Does this do what you want?
=IF(E14=0,IF(F12="No","0",INDEX(Table1[X_Coordinates],MATCH(MIN(Table1[Y_Coordinates]),Table1[Y_Coordinates],FALSE),1)),IF(F12="No","0",INDEX(Table1[X_Coordinates],MATCH(1,(F16=INDIRECT("InputData!N2:N" & InputData!E5 * InputData!F5))*(G16=INDIRECT("InputData!M2:M" & InputData!E5 * InputData!F5))),0)))
Could you attach a sample workbook (without sensitive data), or if that is not possible, make it available through OneDrive, Google Drive, Dropbox or similar?
Hi HansVogelaar
Thank you for your reply. I created a test file but it only contains very basic elements of the main file. I hope it provides enough information.
- HansVogelaarSep 19, 2022MVP
Are the ranges M2:M... and N2:N... in the formula supposed to be on the InputData sheet?
- andrewfeenanSep 19, 2022Copper ContributorYes, they are.
- HansVogelaarSep 19, 2022MVP
Or slightly shorter
=IF(F12="No",0,INDEX(Table1[X_Coordinates],IF(E14=0,MATCH(MIN(Table1[Y_Coordinates]),Table1[Y_Coordinates],0),MATCH(1,(F16=INDIRECT("InputData!N2:N" & InputData!E5*InputData!F5))*(G16=INDIRECT("InputData!M2:M" & InputData!E5*InputData!F5))))))