Generación de informes con solo varios filters funcionando en un filter

Estoy intentando build una database de gastos y un generador de informes para que mi empresa pueda ver y rastrear los gastos en ranges específicos y con estos tres filters: "empleado", "cliente" y "categoría" (categoría de gastos). Todo funciona, excepto cuando bash usar más de un filter.

Si no uso filters, entonces todos = "" funciona muy bien. Si utilizo solo el filter "empleado", funciona muy bien, pero si bash usar el filter para empleados con otros 2 filters u otro filter, se equivoca al no poder encontrar la date de inicio o la date de finalización. Inseguro de lo que está pasando.

Private Function GetReportInformationFromExpensesMaster(ByVal reportStartDate As Date, ByVal reportEndDate As Date, Optional ByVal employee As String, Optional ByVal client As String, Optional ByVal category As String) As Boolean 'Generates report on reports master Dim transferDataRange As Range Dim startDateRow As Integer, endDateRow As Integer Dim errorMessage As String 'employee filter If employee <> "" Then ExpenseMasterList.Range(ExpenseMasterList.Cells(2, MASTERLIST_EMPLOYEE_COLUMN), ExpenseMasterList.Cells(FindLastRow(ExpenseMasterList, MASTERLIST_EMPLOYEE_COLUMN), MASTERLIST_EMPLOYEE_COLUMN)).AutoFilter _ Field:=1, _ Criteria1:=employee, VisibleDropDown:=False 'client filter If client <> "" Then ExpenseMasterList.Range(ExpenseMasterList.Cells(2, MASTERLIST_RELATED_CLIENT_COLUMN), ExpenseMasterList.Cells(FindLastRow(ExpenseMasterList, MASTERLIST_RELATED_CLIENT_COLUMN), MASTERLIST_RELATED_CLIENT_COLUMN)).AutoFilter _ Field:=1, _ Criteria1:=client, VisibleDropDown:=False 'Category If category <> "" Then ExpenseMasterList.Range(ExpenseMasterList.Cells(2, MASTERLIST_CATEGORY_COLUMN), ExpenseMasterList.Cells(FindLastRow(ExpenseMasterList, MASTERLIST_CATEGORY_COLUMN), MASTERLIST_CATEGORY_COLUMN)).AutoFilter _ Field:=1, _ Criteria1:=category, VisibleDropDown:=False 'Find rows after everything sorted startDateRow = FindDateRow(reportStartDate, True) endDateRow = FindDateRow(reportEndDate, False) If startDateRow = -1 Then errorMessage = "Start Date not found in Expense Master under these parameters" GetReportInformationFromExpensesMaster = True GoTo ErrorOutGetReport ExpenseMasterList.AutoFilterMode = False ElseIf endDateRow = -1 Then errorMessage = "End date not found in Expense Master under these parameters" GetReportInformationFromExpensesMaster = True GoTo ErrorOutGetReport ExpenseMasterList.AutoFilterMode = False End If Set transferDataRange = ExpenseMasterList.Range(ExpenseMasterList.Cells(startDateRow, MASTERLIST_REF_ID_COLUMN), ExpenseMasterList.Cells(endDateRow, MASTERLIST_USD_AMOUNT_COLUMN)) transferDataRange.Copy ReportSheet.Cells(9, 1).PasteSpecial Paste:=xlPasteValues Application.CutCopyMode = False 'Clears autofilter mode on expense master list if necessary ExpenseMasterList.AutoFilterMode = False ReportSheet.Cells(8, 1).Activate Exit Function ErrorOutGetReport: MsgBox (errorMessage) End Function 

Buscar filas de inicio / fin por date

 Public Function FindDateRow(ByVal dateToBeFound As Date, ByVal startDateBoolean As Boolean) As Integer 'Finds date locations and if it is unable to find said date then it will return 0 to indicate that a suitable date was not found Dim finderRange As Range, masterListDateRange As Range Dim masterListLastRow As Integer, dateRowFound As Integer Dim dateLoopProxy As Date masterListLastRow = FindLastRow(ExpenseMasterList, MASTERLIST_DATE_COLUMN) Set masterListDateRange = ExpenseMasterList.Range("B3:B" & masterListLastRow) 'Startdate or end date If startDateBoolean Then 'StartDate Set finderRange = masterListDateRange.Find(dateToBeFound, after:=Cells(3, MASTERLIST_DATE_COLUMN), searchdirection:=xlNext) If finderRange Is Nothing Then 'If date is not found iterate forward until it is found 'Date proxy to test initial month against proxy month for iteration through the do loop dateLoopProxy = dateToBeFound Do Until Not finderRange Is Nothing Or Month(dateLoopProxy) <> Month(dateToBeFound) dateLoopProxy = dateLoopProxy + 1 Set finderRange = masterListDateRange.Find(dateLoopProxy, after:=Cells(3, MASTERLIST_DATE_COLUMN), searchdirection:=xlNext) Loop End If If Not finderRange Is Nothing Then dateRowFound = finderRange.Row Else GoTo DateNotFound Else 'End Date Set finderRange = masterListDateRange.Find(dateToBeFound, after:=Cells(masterListLastRow, MASTERLIST_DATE_COLUMN), searchdirection:=xlPrevious) If finderRange Is Nothing Then 'If date is not found iterate backwards until it is found 'Date proxy to test initial month against proxy month for iteration through thedo loop dateLoopProxy = dateToBeFound Do Until Not finderRange Is Nothing Or Month(dateLoopProxy) <> Month(dateToBeFound) 'Iterating backwards (up) to find end date dateLoopProxy = dateLoopProxy - 1 Set finderRange = masterListDateRange.Find(dateLoopProxy, searchdirection:=xlPrevious) Loop End If If Not finderRange Is Nothing Then dateRowFound = finderRange.Row Else GoTo DateNotFound End If FindDateRow = dateRowFound Exit Function DateNotFound: FindDateRow = -1 End Function