PC Review


Reply
Thread Tools Rate Thread

Counting number of e-mail arrived with specific subject for a day, from Excel

 
 
Hii Sing Chung
Guest
Posts: n/a
 
      5th Aug 2009
Hi,

I need help to code VBA in Excel to:
Count the number of e-mail with subject beginning with "Virus Alert:
Detected Not Removed" on a specified date, the date is the value of cell in
the date column. Sample data:
A B
1 Date Alert Mails
2 03 Aug 2009 3
3 04 Aug 2009
4 05 Aug 2009

At the worksheet activate event I want to let the code check if any there is
empty cell in the "Alert Mails" column for which the corresponding date
value in "date" column is today or older. If there is (in the sample above,
the cell B3 is empty and meets the condition that it corresponds to today or
older), go to Outlook folder "Virus Alerts" and count the number of e-mails
with the subject beginning with "Virus Alert: Detected Not Removed" and the
send date of the e-mail = value of A3. The result of the count should then
be entered into B3. It should then continue to check for other cells in
"Alert Mails" column and do the counting of e-mails until corresponding cell
in column date is greater than today.

Any help is very much appreciated.

 
Reply With Quote
 
 
 
 
ryguy7272
Guest
Posts: n/a
 
      5th Aug 2009
I think you want to use the sumproduct function. Look here for some samples
of how you may do this:
http://www.contextures.com/xlFunctio...tml#SumProduct
http://www.ozgrid.com/News/apr-2005.htm

HTH,
Ryan---
--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"Hii Sing Chung" wrote:

> Hi,
>
> I need help to code VBA in Excel to:
> Count the number of e-mail with subject beginning with "Virus Alert:
> Detected Not Removed" on a specified date, the date is the value of cell in
> the date column. Sample data:
> A B
> 1 Date Alert Mails
> 2 03 Aug 2009 3
> 3 04 Aug 2009
> 4 05 Aug 2009
>
> At the worksheet activate event I want to let the code check if any there is
> empty cell in the "Alert Mails" column for which the corresponding date
> value in "date" column is today or older. If there is (in the sample above,
> the cell B3 is empty and meets the condition that it corresponds to today or
> older), go to Outlook folder "Virus Alerts" and count the number of e-mails
> with the subject beginning with "Virus Alert: Detected Not Removed" and the
> send date of the e-mail = value of A3. The result of the count should then
> be entered into B3. It should then continue to check for other cells in
> "Alert Mails" column and do the counting of e-mails until corresponding cell
> in column date is greater than today.
>
> Any help is very much appreciated.
>

 
Reply With Quote
 
Hii Sing Chung
Guest
Posts: n/a
 
      5th Aug 2009
Ah No, that is not what I want. I know the sumproduct function. I want to
count the number of e-mail in Outlook specified folder that has the specific
subject on a specific date, the date is a value in specific cell in Excel,
and the count result to return to Excel.

"ryguy7272" <(E-Mail Removed)> wrote in message
news:ABB41D0A-DBC3-48F4-92B7-(E-Mail Removed)...
> I think you want to use the sumproduct function. Look here for some
> samples
> of how you may do this:
> http://www.contextures.com/xlFunctio...tml#SumProduct
> http://www.ozgrid.com/News/apr-2005.htm
>
> HTH,
> Ryan---
> --
> Ryan---
> If this information was helpful, please indicate this by clicking ''Yes''.
>
>
> "Hii Sing Chung" wrote:
>
>> Hi,
>>
>> I need help to code VBA in Excel to:
>> Count the number of e-mail with subject beginning with "Virus Alert:
>> Detected Not Removed" on a specified date, the date is the value of cell
>> in
>> the date column. Sample data:
>> A B
>> 1 Date Alert Mails
>> 2 03 Aug 2009 3
>> 3 04 Aug 2009
>> 4 05 Aug 2009
>>
>> At the worksheet activate event I want to let the code check if any there
>> is
>> empty cell in the "Alert Mails" column for which the corresponding date
>> value in "date" column is today or older. If there is (in the sample
>> above,
>> the cell B3 is empty and meets the condition that it corresponds to today
>> or
>> older), go to Outlook folder "Virus Alerts" and count the number of
>> e-mails
>> with the subject beginning with "Virus Alert: Detected Not Removed" and
>> the
>> send date of the e-mail = value of A3. The result of the count should
>> then
>> be entered into B3. It should then continue to check for other cells in
>> "Alert Mails" column and do the counting of e-mails until corresponding
>> cell
>> in column date is greater than today.
>>
>> Any help is very much appreciated.
>>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Counting the number of specific days in a year crabb Microsoft ASP .NET 2 30th Oct 2007 09:44 PM
Enforce Specific Encoding To Messages Arrived From Specific Addres =?Utf-8?B?R2ls?= Microsoft Outlook VBA Programming 3 26th Apr 2006 03:00 PM
Enforce Specific Encoding To Messages Arrived From Specific Addres =?Utf-8?B?R2ls?= Microsoft Outlook Discussion 0 20th Apr 2006 09:59 AM
Searching mail-inbox for mail with specific subject and detaching file Sogge Microsoft Access 2 22nd Aug 2005 09:00 PM
Counting number of specific values in a range George Hill Microsoft Excel Discussion 7 11th Jul 2004 08:40 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:12 PM.