Date problem

D

David Stephenson

Hi,

I am trying to find out how to look at two dates and return a value in the
months the dates relate to.

Example

Jun-08 Jul-08 Aug-08 Sep-08 Oct-08 Nov-08 Dec-08 Jan-09
Start End
01/09/2008 30/11/2008 0 0 0 1 1 1 0 0
 
Joined
Aug 27, 2008
Messages
44
Reaction score
0
Are you looking for the MONTH function?
Or would TEXT(A1,"mmm-yy") return the string you want to return?

If I'm totally off, a few examples of the input data and the desired result would help.
 
R

Rob Allchurch

Hi,

I am trying to find out how to look at two dates and return a value in the
months the dates relate to.

Example

                Jun-08  Jul-08  Aug-08  Sep-08  Oct-08  Nov-08  Dec-08  Jan-09
Start   End                                                           
01/09/2008      30/11/2008      0       0       0      1       1       1       0       0

Assuming the column heading dates are 1st of the month, but formatted
to 'mmm-yy' format, and the range shown above starts in A1 (so
'Jun-08' is in C1 and '01/09/2008' is in A3) put the following formula
in C3 and copy to wherever you wish ...

=IF(AND(C$1>=$A3,C$1<=$B3),1,0)

Hope this helps,

Rob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top