I do not believe your ideal works but someone else may know.
Show me all of your script and i may be able to help more
Please find below the code. Th code also sends out an email with teh excel file attachment however have not added that on here.
Code works fine with just "BIRTHDAYS" however not with multiple conditions.
Sub BIRTHDAYS()
Workbooks("DD DATABASE.xlsm").Activate
Worksheets("DATABASE").Activate
Call UPDATE_BIRTHDAYS
Dim record_count As Integer
record_count = WorksheetFunction.CountA(Range("b:b"))
record_count = record_count + 1
'MsgBox record_count
Dim ColCat3 As Integer
Dim ColCat1 As Integer
Dim ColDueDate As Integer
Dim CDueDays As Long
Dim ColCatStatus As Integer
Dim ColName As Integer
Dim ColDesignation As Integer
Dim ColBDR As Integer
ColCat3 = WorksheetFunction.Match("CATEGORY3", ActiveWorkbook.Sheets("DATABASE").Range("1:1"), 0)
ColCat1 = WorksheetFunction.Match("CATEGORY1", ActiveWorkbook.Sheets("DATABASE").Range("1:1"), 0)
ColDueDate = WorksheetFunction.Match("DUE*DATE", ActiveWorkbook.Sheets("DATABASE").Range("1:1"), 0)
CDueDays = WorksheetFunction.Match("DUE*DAY*", ActiveWorkbook.Sheets("DATABASE").Range("1:1"), 0)
ColCatStatus = WorksheetFunction.Match("STATUS", ActiveWorkbook.Sheets("DATABASE").Range("1:1"), 0)
ColName = WorksheetFunction.Match("*E*C*NAME*", ActiveWorkbook.Sheets("DATABASE").Range("1:1"), 0)
ColDesignation = WorksheetFunction.Match("*DESIGNATION*", ActiveWorkbook.Sheets("DATABASE").Range("1:1"), 0)
ColBDR = WorksheetFunction.Match("*Birthday*Reminder*", ActiveWorkbook.Sheets("DATABASE").Range("1:1"), 0)
Dim Cat3 As String
Dim Cat1 As String
Dim Duedate As Date
Dim DueDays As Long
Dim Status As String
Dim Name As String
Dim Designation As String
Dim Total As Integer
Total = WorksheetFunction.CountIfs(Range("c:c"), "BIRTHDAY", Range("c:c"), "CELEBRATIONS", Range("C:C"), "ANNIVARSARY")
MsgBox "Total : " & Total
'WorksheetFunction.Countifs(Worksheets("C&P Output").Range("Ayg3:Ayg10000"), "<" & A100, Worksheets("C&P Output").Range("Ayg3:Ayg10000"), ">" & B100)
Dim J As Integer
J = 2
Dim Z As Integer
Z = 1
'MsgBox j & " " & ColCatStatus
Do While J <= record_count
'Dim Value As String
'Value = Cells(j, ColCat2).Value
'MsgBox Value
If Cells(J, ColCat3).Value = "BIRTHDAY" Or Cells(J, ColCat3).Value = "ANNIVARSARY" Or Cells(J, ColCat3).Value = "CELEBRATIONS" And Cells(J, ColBDR).Value = "Y" Then
'MsgBox "value found"
Dim cell As String
cell = Cells(J, ColCatStatus).Value
'MsgBox j & " " & ColCatStatus & " " & cell
If Cells(J, ColCatStatus).Value = "DUE" Or Cells(J, ColCatStatus).Value = "OVERDUE" Or Cells(J, ColCatStatus).Value = "DUE DATE PENDING" Or Cells(J, ColCatStatus).Value = "DUE TODAY" Then
Cat3 = Cells(J, ColCat3).Value
Cat1 = Cells(J, ColCat1).Value
Duedate = Cells(J, ColDueDate).Value
DueDays = Cells(J, CDueDays).Value
Status = Cells(J, ColCatStatus).Value
Name = Cells(J, ColName).Value
Designation = Cells(J, ColDesignation).Value
'MsgBox Cat2 & vbCrLf & Cat3 & vbCrLf & Duedate & vbCrLf & vbCrLf & Status & vbCrLf & Courtcase
Dim myArray(500, 6) As Variant
myArray(0, 0) = "CATEGORY3"
myArray(0, 1) = "CATEGORY1"
myArray(0, 2) = "DUE DATE"
myArray(0, 3) = "DUE DAYS"
myArray(0, 4) = "STATUS"
myArray(0, 5) = "NAME"
myArray(0, 6) = "DESIGNATION"
myArray(Z, 0) = Cat3
myArray(Z, 1) = Cat1
myArray(Z, 2) = Duedate
myArray(Z, 3) = DueDays
myArray(Z, 4) = Status
myArray(Z, 5) = Name
myArray(Z, 6) = Designation
'MsgBox "Value stored in MyArray record " & vbCrLf & MyArray(0, 0) & " " & MyArray(z, 0) & vbCrLf & MyArray(0, 1) & " " & MyArray(z, 1) & vbCrLf & MyArray(0, 2) & " " & MyArray(z, 2) & vbCrLf & MyArray(0, 3) & " " & MyArray(z, 3) & vbCrLf & MyArray(0, 4) & " " & MyArray(z, 4) & vbCrLf & MyArray(0, 5) & " " & MyArray(z, 5)
Z = Z + 1
End If
End If
J = J + 1
'MsgBox j & " " & ColCatStatus
Loop
Dim Report As String
Dim CDateTime As String
CDateTime = Day(Now()) & Month(Now()) & Year(Now()) & "_" & Hour(Now()) & Minute(Now()) & Second(Now())
Report = "Birthdays_Events_Due" & CDateTime & ".xls"
Dim Path As String
Path = "F:\Corporate\Anshika\Due Dates\sent\"
Workbooks.Add.SaveAs Filename:=Path & Report
Workbooks(Report).Activate
Sheets("Sheet1").Activate
Sheets("Sheet1").Select
Sheets("Sheet1").Name = "Birthdays_Events_Due"
Range("A1:F" & Total + 1).Value = myArray
Range("A1:F1").Font.Bold = True
Worksheets("Birthdays_Events_Due").Range("A:F").Columns.AutoFit
'Worksheets("Transport_Pending").range("A1:G" & Legalcases).VerticalAlignment = xlCenter
Worksheets("Birthdays_Events_Due").Range("E:E").HorizontalAlignment = xlCenter
Worksheets("Birthdays_Events_Due").Range("D:D").NumberFormat = "dd-mm-yyyy"
ActiveWorkbook.SaveAs ("F:\Corporate\Anshika\Due Dates\sent\" & Report)
End Sub
Sub UPDATE_BIRTHDAYS()
'
' UpdateBirthdays Macro
'
'
Worksheets("Database").Activate
ActiveSheet.ListObjects("Table1").Range.AutoFilter Field:=3, Criteria1:= _
Array("BIRTHDAY", "CELEBRATIONS", "ANNIVARSARY"), Operator:=xlFilterValues
ActiveSheet.ListObjects("Table1").Range.AutoFilter Field:=8, Criteria1:= _
"OVERDUE"
ActiveWindow.SmallScroll Down:=-21
Columns("E:E").Select
Selection.Replace What:=Year(Now()), Replacement:=Year(Now()) + 1, LookAt:=xlPart, _
Searchorder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
'ActiveSheet.ListObjects("Table1").Range.AutoFilter Field:=7
'ActiveSheet.ListObjects("Table1").Range.AutoFilter Field:=3
ActiveSheet.AutoFilter.ShowAllData
Worksheets("DATABASE").Activate
End Sub