sunithahal
New Member
- Joined
- Jan 9, 2018
- Messages
- 2
"& ActiveSheet.Previous.Name &" doesn't work in the below formula to refer the values in previous sheet.
ActiveCell.FormulaR1C1 = _
"=IF(ISNA(IF(VLOOKUP(R[2]C[3],'" & ActiveSheet.Previous.Name & "' !R2C10:R1000C12,3,FALSE)=R[2]C[5],"""",VLOOKUP(R[2]C[3],'" & ActiveSheet.Previous.Name & "'!R2C10:R1000C12,3,FALSE))),""New"",IF(VLOOKUP(R[2]C[3],'" & ActiveSheet.Previous.Name & "'!R2C10:R1000C12,3,FALSE)=R[2]C[5],"""",VLOOKUP(R[2]C[3],'" & ActiveSheet.Previous.Name & "'!R2C10:R1000C12,3,FALSE)))"
the actual formula is
=IF(ISNA(IF(VLOOKUP(J3,'Oct-17'!$J$2:$L$1000,3,FALSE)=L3,"",VLOOKUP(J3,'Oct-17'!$J$2:$L$1000,3,FALSE))),"New",IF(VLOOKUP(J3,'Oct-17'!$J$2:$L$1000,3,FALSE)=L3,"",VLOOKUP(J3,'Oct-17'!$J$2:$L$1000,3,FALSE)))
where the 'oct-17 ' refers to the previous sheet
Please help me in making this work
ActiveCell.FormulaR1C1 = _
"=IF(ISNA(IF(VLOOKUP(R[2]C[3],'" & ActiveSheet.Previous.Name & "' !R2C10:R1000C12,3,FALSE)=R[2]C[5],"""",VLOOKUP(R[2]C[3],'" & ActiveSheet.Previous.Name & "'!R2C10:R1000C12,3,FALSE))),""New"",IF(VLOOKUP(R[2]C[3],'" & ActiveSheet.Previous.Name & "'!R2C10:R1000C12,3,FALSE)=R[2]C[5],"""",VLOOKUP(R[2]C[3],'" & ActiveSheet.Previous.Name & "'!R2C10:R1000C12,3,FALSE)))"
the actual formula is
=IF(ISNA(IF(VLOOKUP(J3,'Oct-17'!$J$2:$L$1000,3,FALSE)=L3,"",VLOOKUP(J3,'Oct-17'!$J$2:$L$1000,3,FALSE))),"New",IF(VLOOKUP(J3,'Oct-17'!$J$2:$L$1000,3,FALSE)=L3,"",VLOOKUP(J3,'Oct-17'!$J$2:$L$1000,3,FALSE)))
where the 'oct-17 ' refers to the previous sheet
Please help me in making this work