I think you have a problem with the filtering in the Mutual_fund_fees macro;
You would lose values >100 and <101 with this filtering:
.AutoFilter Field:=14, Criteria1:="<=100"
.AutoFilter Field:=14, Criteria1:=">=101", Operator:=xlAnd, Criteria2:="<=1000"
Your sample data has no such values, as it happens.
You will lose values >1000 and <1001 with this:
.AutoFilter Field:=14, Criteria1:=">=101", Operator:=xlAnd, Criteria2:="<=1000"
.AutoFilter Field:=14, Criteria1:=">=1001", Operator:=xlAnd, Criteria2:="<=3000"
You have 2 such values: 1000.52 on row 2315 and 1000.11 or row 7423 which never appear on your newly created sheets.
You might want to use filter criteria more like this (depending on exactly how you want to split the data):
.AutoFilter Field:=14, Criteria1:="<=100"
.AutoFilter Field:=14, Criteria1:=">100", Operator:=xlAnd, Criteria2:="<=1000"
.AutoFilter Field:=14, Criteria1:=">1000", Operator:=xlAnd, Criteria2:="<=3000"
Also it could be a bit more robust to use
Set wsMaster = Sheets("Master")
instead of:
Set wsMaster = ActiveSheet
in case the active sheet isn't the right sheet when you start your macro.
As regards the three other macros which add the formula, autofill and delete rows, it's probably better to combine these three operations in one macro because you'll be using the usedrange of the sheet to determine where the formulae get put.
Thus:
Sub FormulaeAddandDeleteRows(sht)
'find extent of data on the fees sheet and create formula refs to be used later:
With Sheets("Fees")
Set rngFees = Intersect(.UsedRange, .UsedRange.Offset(1)) 'databody - excludes headers.
End With
ColmAAddress = rngFees.Columns(1).Address(ReferenceStyle:=xlR1C1, external:=True)
ColmCAddress = rngFees.Columns(3).Address(ReferenceStyle:=xlR1C1, external:=True)
ColmDAddress = rngFees.Columns(4).Address(ReferenceStyle:=xlR1C1, external:=True)
'find extent of data on the current sheet:
With sht
Set myRng = Intersect(.UsedRange, .UsedRange.Offset(1)) 'databody - excludes headers.
'Column Q,R & S formulae insert (you could do all this in one column with a longer formula):
Intersect(myRng.EntireRow, .Range("Q:Q")).FormulaR1C1 = "=XLOOKUP(RC8," & ColmAAddress & "," & ColmCAddress & ")"
Intersect(myRng.EntireRow, .Range("R:R")).FormulaR1C1 = "=XLOOKUP(RC8," & ColmAAddress & "," & ColmDAddress & ")"
Intersect(myRng.EntireRow, .Range("S:S")).FormulaR1C1 = "=AND(RC[-2]=0,RC[-1]=0)"
'filter for FALSE:
.UsedRange.AutoFilter Field:=19, Criteria1:="FALSE"
On Error Resume Next
myRng.SpecialCells(xlCellTypeVisible).EntireRow.Delete
On Error GoTo 0
.ShowAllData
'.Range("Q:S").Delete 'if you want.
End With
End Sub
Call this at the bottom of the Mutual_fund_fees macro like this:
For Each sht In Sheets(Array("100 and below", "101 to 1000", "1001 to 3000"))
FormulaeAddandDeleteRows sht
Next sht
You may want to Dim sht as Worksheet at the top.
It was difficult to test because you omitted column H values from the Master sheet. Perhaps attach a workbook with that data included?
All that said, you could use Power Query to do all this processing. I'll prepare something with that tomorrow sometime (for which a new attachment from you would be welcome).