I have a code I've made to paste formulas for an entire row based on the value of one cell within that row, but it will only select one row at a time. I would like it to select all rows that have that same value so I don't have to keep running the macro over an over.
In the example, I am using this to clear out data for employees on a spreadsheet who have been terminated, so their status is listed as TERM in column V. This is the code I have been using:
ActiveSheet.Select
Rows("62:62").Select
Selection.Copy
Dim rngA As Range
Dim cell As Range
Set rngA = Range("V6", Range("V61"))
For Each cell In rngA
If cell.Value = "TERM" Then
cell.EntireRow.Select
End If
Next
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Any assistance I can get is greatly appreciated! Thank you.
Bookmarks