Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
All
Have borrowed some really useful code for calculating the number of emails in a specific mail folder... However, the code uses a single date - I would like to use a range identified in two cells eg Date one - Sheet 1 A1 and Date two Sheet 1 A2 Below is the code and I am at a loss as to how to update this Dim iCount As Integer, DateCount As Integer Dim myDate As Date EmailCount = objFolder.Items.Count DateCount = 0 myDate = Sheets("Sheet1").Range("A1").Value For iCount = 1 To EmailCount With objFolder.Items(iCount) If DateSerial(Year(.ReceivedTime), Month(.ReceivedTime), Day(.ReceivedTime)) = myDate Then DateCount = DateCount + 1 End With Next iCount any assistance would be greatly appreciated Shaz |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Date Ranges | Excel Discussion (Misc queries) | |||
Using IF and date ranges | Excel Worksheet Functions | |||
date ranges | Excel Worksheet Functions | |||
compare date to various date ranges and sum value | Excel Worksheet Functions | |||
If then Date Ranges | Excel Worksheet Functions |