I'm working on a project for work and the last piece of the puzzle is creating a macro button on the end of each row. The macro will move the info to a second sheet and clear the info entered on the first sheet.
I need this for 1000 rows, is there a way to create 1000 macros that are only formatted for the row they are attached to?
I created the code below using the record button in Excel, I'm very new to VBA so any advice would be gladly appreciated it!
UPDATED VBA!
Dim Cell As Range
With Sheets(1)
For Each Cell In .Range("H2:H" & .Cells(.Rows.Count, "H").End(xlUp).Row)
If Cell.Value = "Completed" Then
.Rows(Cell.Row).Copy Destination:=Sheets(2).Rows(Cell.Row)
.Rows(Cell.Row).SpecialCells(xlCellTypeConstants).ClearContents
End If
Next Cell
End With
End Sub
question from:
https://stackoverflow.com/questions/65877644/how-to-create-1000-macro-buttons-without-creating-each-one-individually 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…