werner123
04-02-2017, 09:36 PM
Good Morning
I have this code , it works fine except I need it to make the current founded cell with the "true" statement the Activecell(or Row) and run the call Macro on the active cell , and then move to the next "true" find and make that the Active and repeat the process.
The macro needs to do its business on the active row of every "true" statement
Problem is it finds the first "true" value , and stops
Sub TRUEVALUE()
Dim c As Range
With Sheet1.Range("C1:C10")
Set c = .Find("TRUE", LookIn:=xlValues)
If Not c Is Nothing Then
firstAddress = c.Address
Do
c.Select
Call TOTALVALUE
Set c = .Find(c)
Loop While Not c Is Nothing And c.Address <> firstAddress
End If
End With
End Sub
I have this code , it works fine except I need it to make the current founded cell with the "true" statement the Activecell(or Row) and run the call Macro on the active cell , and then move to the next "true" find and make that the Active and repeat the process.
The macro needs to do its business on the active row of every "true" statement
Problem is it finds the first "true" value , and stops
Sub TRUEVALUE()
Dim c As Range
With Sheet1.Range("C1:C10")
Set c = .Find("TRUE", LookIn:=xlValues)
If Not c Is Nothing Then
firstAddress = c.Address
Do
c.Select
Call TOTALVALUE
Set c = .Find(c)
Loop While Not c Is Nothing And c.Address <> firstAddress
End If
End With
End Sub