Index Match error

A

aileen

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top