View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default Determine if a month falls between two dates.

Fred's suggestion will work.

Here's another method that is basically the same but doesn't require the
column headers to be dates.

C1:N1 = month names as text entries: Jan, Feb, Mar, ... Dec

A2:B2 = some dates

Enter this formula in C2 and copy across to N2:

=IF(AND(COLUMNS($C2:C2)=MONTH($A2),COLUMNS($C2:C2 )<=MONTH($B2)),"X","")

--
Biff
Microsoft Excel MVP


"Robert R" wrote in message
...
T. Valko,

Actually, the dates should always be in the same year
--
Thank you for your assistance!
Rob


"T. Valko" wrote:

Column A - Date
column B -Date
A will always be earlier than B


Are the dates all within the same year? Will you ever have dates like
this:

A2 = 6/25/2010
B2 = 1/12/2011

--
Biff
Microsoft Excel MVP


"Robert R" wrote in message
...
Hello, I have been tasked with trying to do the following

Column A - Date
column B -Date

A will always be earlier than B

columns C-N will be labeled months Jan-Dec

What I need to do is determine if the date between column A and B
includes
the given month in column C - N and return a value of X.

ie...
A B C D E F
Jan Feb Mar Apr
1/1/10 3/12/10 X X X blank

I can then count the X values.

Any help would be greatly appreciated.
--
Thank you for your assistance!
Rob



.