ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Automatic filling of cells within a certain date range (https://www.excelbanter.com/excel-worksheet-functions/255689-automatic-filling-cells-within-certain-date-range.html)

Elor

Automatic filling of cells within a certain date range
 
Can someone please help, I have been stuck on this for the past two days...

Column 'AB' has 'Start Date' and column 'AD' has 'Finish date'

Row 19, cells 'AI' to 'DW' have the months written as 'J' 'F' 'M' 'A'
etc.....from 2008 to 2015.

I want to be able to enter a 'start date' in column 'AB' i.e. 1 January 2008
and a 'Finish date' in column 'AD' i.e. 1 April 2015. Then i would like the
cells 'J - A' on row 19 to be filled with '1' in each month....

I managed to get it to calculate for only 12 months...

here is what i have so far -

=IF(AND(COLUMNS($AI32:BB32)=MONTH($AB32),COLUMNS( $AI32:BB32)<=MONTH($AD32)),1,"")

Thanks in advance,

Elor

Don Guillett[_2_]

Automatic filling of cells within a certain date range
 
If desired, send your file to my address below. I will only look if:
1. You send a copy of this message on an inserted sheet
2. You give me the newsgroup and the subject line
3. You send a clear explanation of what you want
4. You send before/after examples and expected results.


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Elor" wrote in message
...
Can someone please help, I have been stuck on this for the past two
days...

Column 'AB' has 'Start Date' and column 'AD' has 'Finish date'

Row 19, cells 'AI' to 'DW' have the months written as 'J' 'F' 'M' 'A'
etc.....from 2008 to 2015.

I want to be able to enter a 'start date' in column 'AB' i.e. 1 January
2008
and a 'Finish date' in column 'AD' i.e. 1 April 2015. Then i would like
the
cells 'J - A' on row 19 to be filled with '1' in each month....

I managed to get it to calculate for only 12 months...

here is what i have so far -

=IF(AND(COLUMNS($AI32:BB32)=MONTH($AB32),COLUMNS( $AI32:BB32)<=MONTH($AD32)),1,"")

Thanks in advance,

Elor




All times are GMT +1. The time now is 06:01 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com