I have sheet Notice that tells me when to ADD or remove DATA from sheet Board. To ADD, I am using:
This had allowed me to replace 750 buttons assigned to individual macros and only highlights and shows ADD when there is new data.
I am also using 750 buttons assigned to individual macros to REMOVE data using:
This allows me to remove the existing data (from Board) and repopulate formulas (from Board (2)). I would like to replace all these buttons with a single macro however each button is row specific.
The ADD is adding from the active sheet but the REMOVE is copying from one sheet to another. Is there a way to use something like the ADD in place of 750 REMOVE buttons?
VBA Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
On Error GoTo Escape
Application.EnableEvents = False
If Target.Cells.CountLarge = 1 And Not Intersect(Range("H2:H750"), Target) Is Nothing Then
With Target.Cells.Offset(, -2)
.Copy
Sheets("Board").Range("A1").End(xlDown).Offset(1).PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
'UNCOMMENT THIS NEXT LINE if you want the cell value in column F change to "OK" automatically
'.Value2 = "OK"
End With
End If
Continue:
Application.EnableEvents = True
Exit Sub
Escape:
MsgBox "Error " & Err.Number & ": " & Err.Description
Resume C
This had allowed me to replace 750 buttons assigned to individual macros and only highlights and shows ADD when there is new data.
I am also using 750 buttons assigned to individual macros to REMOVE data using:
VBA Code:
Sub Clearcells2()
Sheets("Board (2)").Range("A2:AA2").Copy Destination:=Sheets("Board").Range("A2")
End Sub
This allows me to remove the existing data (from Board) and repopulate formulas (from Board (2)). I would like to replace all these buttons with a single macro however each button is row specific.
The ADD is adding from the active sheet but the REMOVE is copying from one sheet to another. Is there a way to use something like the ADD in place of 750 REMOVE buttons?