Hi Team,
My if formula is not working plz suggest where its going wrong, and
also, if any other solution then also i am ok. Thanks.
Sub Test()
Dim lr As Long
Dim i As Integer
Set ws = ThisWorkbook.Worksheets("sheet1")
lr = ws.Range("A1000").End(xlUp).Row
For i = 1 To lr
ws.Cells(i + 1, 2).Formula = "=if(ws.cells(i+1,2)>5500,""New"",""Historic"")"
'ws.Range("a2:a" & lr).Formula = "=if(ws.cells(i+1,2)>5500,""New"",""Historic"")"
Next i
End Sub
Regards
Mallesh
<strike></strike>
My if formula is not working plz suggest where its going wrong, and
also, if any other solution then also i am ok. Thanks.
Sub Test()
Dim lr As Long
Dim i As Integer
Dim ws As Worksheet
<strike></strike>Set ws = ThisWorkbook.Worksheets("sheet1")
lr = ws.Range("A1000").End(xlUp).Row
For i = 1 To lr
ws.Cells(i + 1, 2).Formula = "=if(ws.cells(i+1,2)>5500,""New"",""Historic"")"
'ws.Range("a2:a" & lr).Formula = "=if(ws.cells(i+1,2)>5500,""New"",""Historic"")"
Next i
End Sub
Regards
Mallesh
<strike></strike>