Hi, vimalanathk,,
you compare the contents of Range(C2) constantly - is this calculated by formula or a constant value found in Column C? Maybe try it like this or post a sample of your workbook:
Sub test()
Range("K2").Select
Do Until Cells(ActiveCell.row, 3) = "Powered by GL Compliance Manager"
With ActiveCell
.Offset(0, 1).FormulaR1C1 = "=+RC[-11]"
.End(xlDown).Select
End With
Loop
End Sub
Alternative code:
Sub test2()
Dim rngFound As Range
Set rngFound = Columns(3).Find(what:="Powered by GL Compliance Manager", LookAt:=xlWhole)
If Not rngFound Is Nothing Then
Range("L2:L" & rngFound.row).FormulaR1C1 = "=RC[-11]"
End If
Set rngFound = Nothing
End Sub
You should consider any other variable as Row is part of the VBA vocabulary.
Ciao,
Holger
Bookmarks