I am using MS Office Excel 2003. I want to compare the values in sheet1.cell N4 with sheet2.cell E4 using an if function in sheet1. I then want to autofill the remaining rows with the formula. I am able to do this but as the formula is carried down sheet1 in continues to reference sheet2.E4 instead of moving down that column as well.
What is the syntax to create a relative reference on the 2nd worksheet.
Here's a snippet of my code that I'm sure unveils my mediocrity.
What is the syntax to create a relative reference on the 2nd worksheet.
Here's a snippet of my code that I'm sure unveils my mediocrity.
Code:
NbRowsFinal = TheRecordsNum + 3
'insert formula to compare SREA and QVR reports
Range("T4").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-6]=PasteSummaryHere!R4C5,""ok"",PasteSummaryHere!R4C5)"
Range("T4").Select
Selection.AutoFill Destination:=Range(Cells(4, 20), Cells(NbRowsFinal, 20)), Type:=xlFillDefault