+ Reply to Thread
Results 1 to 3 of 3

Counting appoointments by category

  1. #1
    Registered User
    Join Date
    02-14-2013
    Location
    Wisconsin, USA
    MS-Off Ver
    Excel 2010
    Posts
    55

    Counting appoointments by category

    Does anyone have some code or an idea on how to code to count an outlook calendar's appointments by category. I would like to count the green and yellow categorized items.

  2. #2
    Registered User
    Join Date
    02-14-2013
    Location
    Wisconsin, USA
    MS-Off Ver
    Excel 2010
    Posts
    55

    Re: Counting appoointments by category

    Here's my code. It's retunring 0 so not sure it is evening counting what I want it to.

    Sub CategoryFinder()

    Dim Appt As Outlook.AppointmentItem
    Dim cntYellow As Integer
    Dim cntBlue As Integer
    Dim Items As Outlook.Items
    Dim Calendar As Outlook.Folder

    Set Calendar = Session.GetDefaultFolder(olFolderCalendar)
    Set Items = Calendar.Items

    cntBlue = 0

    For Each Appt In Items
    On Error Resume Next
    If Appt.End < Now() And Appt.End > Now() - 3 And Appt.Categories = "Assesment" Then
    cntBlue = cntBlue + 1
    End If
    Next Appt

    Debug.Print cntBlue

    Set Appt = Nothing

    End Sub

  3. #3
    Registered User
    Join Date
    02-14-2013
    Location
    Wisconsin, USA
    MS-Off Ver
    Excel 2010
    Posts
    55

    Re: Counting appoointments by category

    I did find a resolution to my issue

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 0
    Last Post: 04-09-2014, 04:21 PM
  2. Replies: 2
    Last Post: 09-14-2012, 04:31 AM
  3. [SOLVED] counting excel data with a column category
    By fusion5151 in forum Excel General
    Replies: 11
    Last Post: 07-02-2012, 11:10 PM
  4. [SOLVED] Productsum: Highest Frequency Category, Specific Main Category, Frequency of Category
    By T86157 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-24-2012, 12:43 PM
  5. Counting category
    By Saturn in forum Excel General
    Replies: 2
    Last Post: 10-04-2011, 03:04 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1