Private Sub CommandButton1_Click()
Dim r As Integer
r = ActiveCell.Row + 1
ActiveSheet.Cells(r, 1).Value = vbCrLf & "New " & vbCrLf & "Row" & vbCrLf
Range(Cells(r, 2), Cells(r, 15)).Interior.Color = vbYellow
Using June as an Example
June is J16: P21
Select that edit the Orange CF
Use this modified formula
ie: Use the Month of the Month and Month of the Date as an extra check
AS debaser described, the On error is still active once triggered
If another error occurs it will go back to 10
so you need to a reset statement as described into the end of the error handling to stop that behaviour
The below is what you want
I'm not sure where you want to jump back to, so adjust accordingly
Do Until surplus = 0
adr = "AF" & lmin & ":AF" & lmax & ""
If lmax - lmin = 0 Then
min = Application.WorksheetFunction.Subtotal(5...
It is important to know what do you want to do with it ?
If you want to map locations against it, do you want the data in UTM or WGS84 format?
If you want to simply color the states that isn't important
You also want cities ?
Change the last two rows as shown below:
Dim MstWSName_Transactions As Worksheet
Dim MstTblName_Transactions, MaxSrNumber As String
Dim O_MstTbl_Transactions As ListObject
Dim fnd, rngSearch, Maxrr As Range
'Set Master Worksheet and Master Table for Transactions...