#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 144
Default Date LookUp

I have a list of policies that contains an Effective Date and a Cancellation
Date. I'm trying to do a count by month over the span of a couple of years
of how many policys were active in the given month.

For Example;
May 2007 = 423
June 2007 = 427 and so on.

I need to know if the month I am counting (May 2007) is between the
Effective Date and the Cancellation Date and if it is to include that line
item in the count (423).

Any help will be appreciated.


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,355
Default Date LookUp

I'd try something like this

=SUMPRODUCT(--(Sheet1!A1:A10 = Date(YEAR(Begin),Month(Begin),Day(Begin)
),--(Sheet1!A1:A10 = Date(YEAR(End),Month(End),Day(End) ),
(Sheet1!B1:B10))


Where A1:A10 are the columns with dates, Begin is the "effective date", End
is the "Cancellation Date" and B1:B10 contain the count.

--
HTH,
Barb Reinhardt

If this post was helpful to you, please click YES below.



"Jordan" wrote:

I have a list of policies that contains an Effective Date and a Cancellation
Date. I'm trying to do a count by month over the span of a couple of years
of how many policys were active in the given month.

For Example;
May 2007 = 423
June 2007 = 427 and so on.

I need to know if the month I am counting (May 2007) is between the
Effective Date and the Cancellation Date and if it is to include that line
item in the count (423).

Any help will be appreciated.


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,355
Default Date LookUp

I'm not sure I got the = and <= signs right on the last post and it hasn't
come up yet. Watch for that.

Barb Reinhardt

"Jordan" wrote:

I have a list of policies that contains an Effective Date and a Cancellation
Date. I'm trying to do a count by month over the span of a couple of years
of how many policys were active in the given month.

For Example;
May 2007 = 423
June 2007 = 427 and so on.

I need to know if the month I am counting (May 2007) is between the
Effective Date and the Cancellation Date and if it is to include that line
item in the count (423).

Any help will be appreciated.


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,766
Default Date LookUp

Hi,

You can use the following array formula (Ctrl+Shift+Enter). col A has
effective date, col B had expiry date and col C has number of policies

SUM(IF((A2:A4<=A6)*(B2:B4=A6),C2:C4))

--
Regards,

Ashsih Mathur
Microsoft Excel MVP
www.ashishmathur.com

"Jordan" wrote in message
...
I have a list of policies that contains an Effective Date and a
Cancellation
Date. I'm trying to do a count by month over the span of a couple of
years
of how many policys were active in the given month.

For Example;
May 2007 = 423
June 2007 = 427 and so on.

I need to know if the month I am counting (May 2007) is between the
Effective Date and the Cancellation Date and if it is to include that line
item in the count (423).

Any help will be appreciated.


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
Date Lookup drumbumuk Excel Discussion (Misc queries) 1 August 8th 08 10:25 AM
Lookup MIN Date Bob Phillips[_3_] Excel Worksheet Functions 0 August 1st 08 05:56 PM
Lookup MIN Date dcr Excel Worksheet Functions 6 August 1st 08 05:55 PM
Lookup MIN Date Pete_UK Excel Worksheet Functions 0 July 25th 08 08:10 PM
Lookup the date associated with a given value hello Excel Discussion (Misc queries) 2 June 11th 08 05:16 PM


All times are GMT +1. The time now is 06:26 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"