Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Index Match error
I am trying to Match data between two workbooks and if a match is found I
would like to return a value from a different cell. The code I am using that someone from here helped me with is: Range("Y1").Select ActiveCell.FormulaR1C1 = _ "=INDEX(spxsymbols.xlsm!C10,MATCH(RC[-1],spxsymbols.xlsm!C6,0) The workbook names are qic.csv, which is the active sheet, and spxsymbols.xlsm which is the workbook that I am finding a match from and returning a value from. The data is as follows use data from X1 from qic.csv and search column J from spxsymbols.xlsm and when a match is found, return the F cell data from the same row in spxsymbols.xlsm to Y1 in qic.csv. Then I fill in Column Y all the way down with this formula for the rest of the data. For some reason, this formula was working fine until I had to change the column #s and data that is being matched. I am now returning a #N/A error. Please let me know what may be wrong with the formula. Here's an example of the data in each of the columns: qic.csv: Column X spysymbols.xlsm: Column F Column J SPXZ8C855 SPXLL SPXZ8C860 SPXLM SPXZ8C865 SPXLN SPXZ8C870 SPXLO SPXZ8C875 SPXLP SPXZ8C880 SPXLQ SPXZ8C885 SPXLR SPXZ8C890 SPXLS SPXZ8C895 The value in F that should be returned is SPXLQ. Any help is greatly appreciated. Thanks. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Index Match error
I've figured this out, so no need to respond.
Thanks "aileen" wrote: I am trying to Match data between two workbooks and if a match is found I would like to return a value from a different cell. The code I am using that someone from here helped me with is: Range("Y1").Select ActiveCell.FormulaR1C1 = _ "=INDEX(spxsymbols.xlsm!C10,MATCH(RC[-1],spxsymbols.xlsm!C6,0) The workbook names are qic.csv, which is the active sheet, and spxsymbols.xlsm which is the workbook that I am finding a match from and returning a value from. The data is as follows use data from X1 from qic.csv and search column J from spxsymbols.xlsm and when a match is found, return the F cell data from the same row in spxsymbols.xlsm to Y1 in qic.csv. Then I fill in Column Y all the way down with this formula for the rest of the data. For some reason, this formula was working fine until I had to change the column #s and data that is being matched. I am now returning a #N/A error. Please let me know what may be wrong with the formula. Here's an example of the data in each of the columns: qic.csv: Column X spysymbols.xlsm: Column F Column J SPXZ8C855 SPXLL SPXZ8C860 SPXLM SPXZ8C865 SPXLN SPXZ8C870 SPXLO SPXZ8C875 SPXLP SPXZ8C880 SPXLQ SPXZ8C885 SPXLR SPXZ8C890 SPXLS SPXZ8C895 The value in F that should be returned is SPXLQ. Any help is greatly appreciated. Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Index Match Error | Excel Worksheet Functions | |||
INDEX/MATCH #REF! error | Excel Discussion (Misc queries) | |||
index/match error | Excel Worksheet Functions | |||
INDEX MATCH #N/A Error | Excel Worksheet Functions | |||
Index Match #N/A error, please help | Excel Programming |