I have some code which I initially created in Excel 2003.
Sheets("Student Report").Cells(3, 20) = "=IF(RC17<>0,INDEX(Names!C2,MATCH(RC17,Names!C1,0)) & "", "" & INDEX(Names!C3,MATCH(RC17,Names!C1,0)),"""")"
It has worked like a charm. In the spreadsheet cell it showed up as:
=IF(RC17<>0,INDEX(Names!C2,MATCH(RC17,Names!C1,0)) & ", " & INDEX(Names!C3,MATCH(RC17,Names!C1,0)),"")
I am now trying to run my spreadsheet under Excel 2010. I've changed my xls spreadsheet to xlsm and this very code now shows up in the spreadsheet cell as this:
=IF(R[14]C[451]<>0,INDEX(Names!R[-1]C[-17],MATCH(R[14]C[451],Names!R[-2]C[-17],0)) & ", " & INDEX(Names!RC[-17],MATCH(R[14]C[451],Names!R[-2]C[-17],0)),"")
What am I doing wrong?
Sheets("Student Report").Cells(3, 20) = "=IF(RC17<>0,INDEX(Names!C2,MATCH(RC17,Names!C1,0)) & "", "" & INDEX(Names!C3,MATCH(RC17,Names!C1,0)),"""")"
It has worked like a charm. In the spreadsheet cell it showed up as:
=IF(RC17<>0,INDEX(Names!C2,MATCH(RC17,Names!C1,0)) & ", " & INDEX(Names!C3,MATCH(RC17,Names!C1,0)),"")
I am now trying to run my spreadsheet under Excel 2010. I've changed my xls spreadsheet to xlsm and this very code now shows up in the spreadsheet cell as this:
=IF(R[14]C[451]<>0,INDEX(Names!R[-1]C[-17],MATCH(R[14]C[451],Names!R[-2]C[-17],0)) & ", " & INDEX(Names!RC[-17],MATCH(R[14]C[451],Names!R[-2]C[-17],0)),"")
What am I doing wrong?