Hi everyone
here is my situation:
I have multiple workbooks that is filled in by people. This workbook has headers but these headers are in different columns depending on the person filling this in and the customer for who it is. These headers can be on row 2 or 3.
I need to extract data from this workbook, so I make a new generic workbook where I place my headers in.
Next I look up if my header corresponds with the header from the workbook containing the data:
=IF(C$2='[Follow-Up.xls]IN'!C$2;'[Follow-Up.xls]IN'!C$1;
=> Read this as: If my cell C2 matches the cell C2 from the file Follow-Up.xls worksheet IN, then copy the cell C1 from the file Follow-Up.xls worksheet IN to this cell.
If C2 doesn't match cell C2 from the file Follow-Up.xls worksheet IN
INDEX('[Follow-Up.xls]IN'!$A$1:$FZ$6000;1;MATCH(C$2;'[Follow-Up.xls]IN'!$A$2:$FZ$3;0)))
Look for a match of cell C2 in the file Follow-Up.xls worksheet IN range A2:FZ3
If you have found this, display the first entry (hence the 1) from this row in the range A1:FZ600
The problem I have with this formula is that the following doesn't work:
MATCH(C$2;'[Follow-Up.xls]IN'!$A$2:$FZ$3;0)))
It resolves C2 but NOT '[Follow-Up.xls]IN'!$A$2:$FZ$3
it returns #value.
however when i change $A$2:$FZ$3 with 2:2 (only row 2) the formula works (for the worksheets where the info is in row 2.
Can anybody tell me what I do wrong (or give me a better solution to my problem?
Kind regards
PS: for completeness; this is the formula as a whole:
=IF(C$2='[Follow-Up.xls]IN'!C$2;'[Follow-Up.xls]IN'!C$1;INDEX('[Follow-Up.xls]IN'!$A$1:$FZ$6000;1;MATCH(C$2;'[Follow-Up.xls]IN'!$A$2:$FZ$3;0)))
Bookmarks