Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
AOP AOP is offline
external usenet poster
 
Posts: 23
Default Countif between two dates

I have the following formular:

=IF($B5002="","",COUNTIF(MAIN!$B$10:$B$5000,"" &$B5002 & ""))
Column A is the date
Column B is the unit

How do I modify it to count between two dates that are in cells Sheet2 P3
and R3

Thank you
--
AOP
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default Countif between two dates

adapt to suit
=sumproduct((a2:a22b1)*(a2:a22<=b2))

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"AOP" wrote in message
...
I have the following formular:

=IF($B5002="","",COUNTIF(MAIN!$B$10:$B$5000,"" &$B5002 & ""))
Column A is the date
Column B is the unit

How do I modify it to count between two dates that are in cells Sheet2 P3
and R3

Thank you
--
AOP


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default Countif between two dates

=IF($B5002="","",SUMPRODUCT(--(Main!$A$10:$A$5000=Sheet2!P3),--(Main!$A$10:$A$5000<=Sheet2!R3),--(Main!$B$10:$B$5000=$B5002)))

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"AOP" wrote in message
...
I have the following formular:

=IF($B5002="","",COUNTIF(MAIN!$B$10:$B$5000,"" &$B5002 & ""))
Column A is the date
Column B is the unit

How do I modify it to count between two dates that are in cells Sheet2 P3
and R3

Thank you
--
AOP



  #4   Report Post  
Posted to microsoft.public.excel.misc
AOP AOP is offline
external usenet poster
 
Posts: 23
Default Countif between two dates

That works fine
Thank you
--
AOP


"Bob Phillips" wrote:

=IF($B5002="","",SUMPRODUCT(--(Main!$A$10:$A$5000=Sheet2!P3),--(Main!$A$10:$A$5000<=Sheet2!R3),--(Main!$B$10:$B$5000=$B5002)))

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"AOP" wrote in message
...
I have the following formular:

=IF($B5002="","",COUNTIF(MAIN!$B$10:$B$5000,"" &$B5002 & ""))
Column A is the date
Column B is the unit

How do I modify it to count between two dates that are in cells Sheet2 P3
and R3

Thank you
--
AOP




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
CountIF with dates Secret Squirrel Excel Discussion (Misc queries) 13 November 15th 06 09:08 PM
using countif to add dates jwmillzy Excel Discussion (Misc queries) 2 June 2nd 06 06:27 PM
COUNTIF using Dates WLMPilot Excel Worksheet Functions 1 October 7th 05 12:51 AM
Countif using dates Bugaglugs Excel Worksheet Functions 11 August 23rd 05 05:16 PM
countif and dates JAF New Users to Excel 2 December 3rd 04 04:45 PM


All times are GMT +1. The time now is 04:00 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"