Loss1003
02-10-2012, 11:58 AM
I'm attempting to write code to change the value of the cell below when the cell above matches "Amount X's of" in column G. However the range can expand or collapse based on the amount of rows the user enters.
Dim FoundCell As Range
Set FoundCell = Range("G2:G100").Find(What:="Amount X's of")
Do Until FoundCell Is Nothing
ActiveCell.Offset(1, 0).Value = "25"
Set FoundCell = Range("G2:G100").FindNext
Loop
Amount of X's of
1111 (change this)
1111 (do not change)
1111 (do not change)
Amount of X's of
0000 (change this)
1111 (do not change)
1111 (do not change)
Dim FoundCell As Range
Set FoundCell = Range("G2:G100").Find(What:="Amount X's of")
Do Until FoundCell Is Nothing
ActiveCell.Offset(1, 0).Value = "25"
Set FoundCell = Range("G2:G100").FindNext
Loop
Amount of X's of
1111 (change this)
1111 (do not change)
1111 (do not change)
Amount of X's of
0000 (change this)
1111 (do not change)
1111 (do not change)