WORKING PAPERS: EXCEL & VBA
The preparer may wish to flag points to the manager. They may do this through the use of these hyperlinks and a centralised schedule. However, it would become annoying to have to find every new month and return them so a check box automates this process for the user.
Create dynamic code to take in numbered placeholder Range
Sub ReturnPlaceHolders()
If Range(ActiveSheet.CheckBoxes(Application.Caller).LinkedCell).Value = True Then
Dim I As Byte
Dim ph As String
Dim PFMPoint As String
For I = 1 To 12
ph = "PFM" & I & "ph"
PFMPoint = "PFM" & I & "_"
Dim ReturnCell As Range: Set ReturnCell = Range(ph)
Dim ReturnArea As Range: Set ReturnArea = Range(PFMPoint).Offset(0, -1)
ReturnCell.Cut ReturnArea
Next I
End If
End Sub