Tim Hanson
Member
Can someone tell me what I am doing wrong?
Thanks
Thanks
Code:
Sub NumID()
Dim rng As Range
Dim Lastrow As Long
With Sheets("sheet1")
Lastrow = .Range("B" & .Rows.Count).End(xlUp).Row
End With
Range("C3:C" & Lastrow).FormulaR1C1 = "=IF(B2=B3,C2,C2+1)"
Range("C3:C" & Lastrow).Copy
Range("C3:C" & Lastrow).PasteSpecial xlPasteValues
End Sub