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
 
D

dustinbrearton via OfficeKB.com

Steva,
More details are needed to help you. Your question did not make sense
and the example did nothing to clear anything up. Please explain what you
are trying to do a little more clearly.
 
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