How to count emails by category in Outlook?
You might have highlighted emails with color categories in Outlook. But, do you know how to count emails by categories? This article will share two solutions:
- Enhance your email productivity with AI technology, enabling you to quickly reply to emails, draft new ones, translate messages, and more efficiently.
- Automate emailing with Auto CC/BCC, Auto Forward by rules; send Auto Reply (Out of Office) without requiring an exchange server...
- Get reminders like BCC Warning when replying to all while you're in the BCC list, and Remind When Missing Attachments for forgotten attachments...
- Improve email efficiency with Reply (All) With Attachments, Auto Add Greeting or Date & Time into Signature or Subject, Reply Multiple Emails...
- Streamline emailing with Recall Emails, Attachment Tools (Compress All, Auto Save All...), Remove Duplicates, and Quick Report...
Count emails by category in Outlook with Instant Search feature
This method will guide yo to find out all emails marked with the specified color categories by the Instant Search feature, and then easily get the total number of all search results at the Status bar.
1. In the Mail view, press Ctrl + E keys simultaneously to activate the Search Tools.
2. Click Search > Categorized, and then select the specified color category you will count emails by.
3. Now all emails marked with the specified color category are found out and listed in the mail list. And you can easily get the total number of all search results at the status bar. See screenshot:
Notes:
(1) For counting emails marked with Yellow category and Orange category simultaneously, please type the search criteria category:="Yellow Category" AND "Orange Category" into the Instant Search box directly:
(2) For counting emails marked with Yellow category or Orange category simultaneously, please type the search criteria category:="Yellow Category" OR "Orange Category" into the Instant Search box directly.
Count emails by category in Outlook with VBA
This method will introduce a VBA to count emails by category in a custom date range in Outlook. Please do as follows:
1. In the Mail view, select the email folder that you will count emails.
2. Press Alt + F11 keys simultaneously to open the Microsoft Visual Basic for Applications window.
3. Click Insert > Module, and then paste below VBA code into the new opening Module window:
VBA: Count emails by category in Outlook
Sub CategoriesEmails()
Dim oFolder As MAPIFolder
Dim oDict As Object
Dim sStartDate As String
Dim sEndDate As String
Dim oItems As Outlook.Items
Dim sStr As String
Dim sMsg As String
On Error Resume Next
Set oFolder = Application.ActiveExplorer.CurrentFolder
Set oDict = CreateObject("Scripting.Dictionary")
sStartDate = InputBox("Type the start date (format MM/DD/YYYY)")
sEndDate = InputBox("Type the end date (format MM/DD/YYYY)")
Set oItems = oFolder.Items.Restrict("[Received] >= '" & sStartDate & "' And [Received] <= '" & sEndDate & "'")
oItems.SetColumns ("Categories")
For Each aitem In oItems
sStr = aitem.Categories
If Not oDict.Exists(sStr) Then
oDict(sStr) = 0
End If
oDict(sStr) = CLng(oDict(sStr)) + 1
Next aitem
sMsg = ""
For Each aKey In oDict.Keys
sMsg = sMsg & aKey & ": " & oDict(aKey) & vbCrLf
Next
MsgBox sMsg
Set oFolder = Nothing
End Sub
4. Press the F5 key or click the Run button to run this VBA.
5. (1) In the first popping out Microsoft Outlook dialog box, please type the start date of the custom date range you will count emails within, and click the OK button. (2) In the second Microsoft Outlook dialog box, please type the end date, and click the OK button. See screenshots:
And now a dialog box comes out and displays the numbers of emails marked with color categories. See screenshot:
Related Articles
Count the total number of search results in Outlook
Count hours/days/weeks spent on an appointment or meeting in Outlook
Count the number of emails by subject in Outlook
Best Office Productivity Tools
Breaking News: Kutools for Outlook Launches Free Version!
Experience the all-new Kutools for Outlook with 100+ incredible features! Click to download now!
π€ Kutools AI : Uses advanced AI technology to handle emails effortlessly, including replying, summarizing, optimizing, extending, translating, and composing emails.
π§ Email Automation: Auto Reply (Available for POP and IMAP) / Schedule Send Emails / Auto CC/BCC by Rules When Sending Email / Auto Forward (Advanced Rules) / Auto Add Greeting / Automatically Split Multi-Recipient Emails into Individual Messages ...
π¨ Email Management: Recall Emails / Block Scam Emails by Subjects and Others / Delete Duplicate Emails / Advanced Search / Consolidate Folders ...
π Attachments Pro: Batch Save / Batch Detach / Batch Compress / Auto Save / Auto Detach / Auto Compress ...
π Interface Magic: πMore Pretty and Cool Emojis / Remind you when important emails come / Minimize Outlook Instead of Closing ...
π One-click Wonders: Reply All with Attachments / Anti-Phishing Emails / πShow Sender's Time Zone ...
π©πΌβπ€βπ©π» Contacts & Calendar: Batch Add Contacts From Selected Emails / Split a Contact Group to Individual Groups / Remove Birthday Reminders ...
Use Kutools in your preferred language β supports English, Spanish, German, French, Chinese, and 40+ others!


π One-Click Download β Get All Office Add-ins
Strongly Recommended: Kutools for Office (5-in-1)
One click to download five installers at once β Kutools for Excel, Outlook, Word, PowerPoint and Office Tab Pro. Click to download now!
- β One-click convenience: Download all five setup packages in a single action.
- π Ready for any Office task: Install the add-ins you need, when you need them.
- π§° Included: Kutools for Excel / Kutools for Outlook / Kutools for Word / Office Tab Pro / Kutools for PowerPoint