Hi, so I was able to fix that aspect of the above code. Thank You. It runs on all worksheets
However I keep getting a runtime error 91 : Object variable or with block variable not set
Wondering how best to fix this
Sub asda()
Dim q As Integer
Dim currentsheet As Worksheet
Dim c As Range, firstaddress As String, a As Long
Worksheets(1).Activate
For q = 1 To ActiveWorkbook.Worksheets.Count
Set currentsheet = ActiveWorkbook.Worksheets(q)
Worksheets(q).Activate
With Columns(1)
Set c = .Find("Investor", LookIn:=xlValues, LookAt:=xlWhole)
If Not c Is Nothing Then
firstaddress = c.Address
Do
a = a + 1
If a > 1 Then c = "Holder"
c.Offset(, 3) = "% of CSO"
Range("C" & c.Row & ":C" & c.Row + 20).Value = Range("D" & c.Row & ":D" & c.Row + 20).Value
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address <> firstaddress
Range(firstaddress) = "Holder"
End If
End With
Next q
End Sub
Bookmarks