Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default List the months between 2 dates

I really need to find a function/formula which will show me the NAMES of
months which fall between 2 dates.

Ie 1/1/2007 to 31/3/2007 should show me Jan, Feb, Mar.

I do not want a count of months between 2 dates but what months fall between
the 2 dates.

PLEASE HELP!!!
Emma
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default List the months between 2 dates

Select 12 cells and enter

=TEXT(DATE(YEAR(TODAY()),ROW(INDIRECT(MONTH(A1)&": "&MONTH(A1)+DATEDIF(A1,A2,"m"))),1),"mmm")

as a block array formula.

It will show #N/A for months not in the range


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"curly_lox" wrote in message
...
I really need to find a function/formula which will show me the NAMES of
months which fall between 2 dates.

Ie 1/1/2007 to 31/3/2007 should show me Jan, Feb, Mar.

I do not want a count of months between 2 dates but what months fall
between
the 2 dates.

PLEASE HELP!!!
Emma



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default List the months between 2 dates

Perhaps one close alternative which might be acceptable ?

Assuming the earlier date is in A2, later date in B2 (real dates, of course)
then in say, C2:
=TEXT(A2,"mmm")&" - "&TEXT(B2,"mmm")
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"curly_lox" wrote:
I really need to find a function/formula which will show me the NAMES of
months which fall between 2 dates.

Ie 1/1/2007 to 31/3/2007 should show me Jan, Feb, Mar.

I do not want a count of months between 2 dates but what months fall between
the 2 dates.

PLEASE HELP!!!
Emma

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,886
Default List the months between 2 dates

Hi Emma

With your start date in A1 and end Date in B1 enter in D1
=TEXT(A1,"mmm")
and in E1
=IF(DATE(YEAR($A1),MONTH($A1)+COLUMN(A1),1)<$B1,
TEXT(DATE(YEAR($A1),MONTH($A1)+COLUMN(A1),1),"mmm" ),"")
copy across through F1:O1

--
Regards

Roger Govier


"curly_lox" wrote in message
...
I really need to find a function/formula which will show me the NAMES
of
months which fall between 2 dates.

Ie 1/1/2007 to 31/3/2007 should show me Jan, Feb, Mar.

I do not want a count of months between 2 dates but what months fall
between
the 2 dates.

PLEASE HELP!!!
Emma



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default List the months between 2 dates

Hmm I guess that is a step closer to what I'm after.

Still accepting any other alternatives!!!

Thanks Max

"Max" wrote:

Perhaps one close alternative which might be acceptable ?

Assuming the earlier date is in A2, later date in B2 (real dates, of course)
then in say, C2:
=TEXT(A2,"mmm")&" - "&TEXT(B2,"mmm")
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"curly_lox" wrote:
I really need to find a function/formula which will show me the NAMES of
months which fall between 2 dates.

Ie 1/1/2007 to 31/3/2007 should show me Jan, Feb, Mar.

I do not want a count of months between 2 dates but what months fall between
the 2 dates.

PLEASE HELP!!!
Emma



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default List the months between 2 dates

welcome, check out responses by Bob & Roger!
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"curly_lox" wrote in message
...
Hmm I guess that is a step closer to what I'm after.

Still accepting any other alternatives!!!

Thanks Max



  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default List the months between 2 dates

Roger this looks really good and on practising it in a new worksheet it
worked perfectly. I already have this giant spreadsheet up though so when I
go to put in the formula and change which cells its referring to it shows a
blank.

The Start Month is in Y2, The End Month is in Z2, and the Text Start Month
is in U2. I'm guessing that the (1) in the formula is whats throwing it out
slightly

"Roger Govier" wrote:

Hi Emma

With your start date in A1 and end Date in B1 enter in D1
=TEXT(A1,"mmm")
and in E1
=IF(DATE(YEAR($A1),MONTH($A1)+COLUMN(A1),1)<$B1,
TEXT(DATE(YEAR($A1),MONTH($A1)+COLUMN(A1),1),"mmm" ),"")
copy across through F1:O1

--
Regards

Roger Govier


"curly_lox" wrote in message
...
I really need to find a function/formula which will show me the NAMES
of
months which fall between 2 dates.

Ie 1/1/2007 to 31/3/2007 should show me Jan, Feb, Mar.

I do not want a count of months between 2 dates but what months fall
between
the 2 dates.

PLEASE HELP!!!
Emma




  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,886
Default List the months between 2 dates

Hi Emma

Assuming the three cells in which you want the month names to show are
U2, V2 and W2
U2
=TEXT(Y2,"mmm")
V2
=IF(DATE(YEAR($Y2),MONTH($Y2)+COLUMN(A1),1)<$Z2,
TEXT(DATE(YEAR($Y2),MONTH($Y2)+COLUMN(A1),1),"mmm" ),"")
copy across to W2
--
Regards

Roger Govier


"curly_lox" wrote in message
...
Roger this looks really good and on practising it in a new worksheet
it
worked perfectly. I already have this giant spreadsheet up though so
when I
go to put in the formula and change which cells its referring to it
shows a
blank.

The Start Month is in Y2, The End Month is in Z2, and the Text Start
Month
is in U2. I'm guessing that the (1) in the formula is whats throwing
it out
slightly

"Roger Govier" wrote:

Hi Emma

With your start date in A1 and end Date in B1 enter in D1
=TEXT(A1,"mmm")
and in E1
=IF(DATE(YEAR($A1),MONTH($A1)+COLUMN(A1),1)<$B1,
TEXT(DATE(YEAR($A1),MONTH($A1)+COLUMN(A1),1),"mmm" ),"")
copy across through F1:O1

--
Regards

Roger Govier


"curly_lox" wrote in message
...
I really need to find a function/formula which will show me the
NAMES
of
months which fall between 2 dates.

Ie 1/1/2007 to 31/3/2007 should show me Jan, Feb, Mar.

I do not want a count of months between 2 dates but what months
fall
between
the 2 dates.

PLEASE HELP!!!
Emma






  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default List the months between 2 dates

thank you for this!!

"Roger Govier" wrote:

Hi Emma

Assuming the three cells in which you want the month names to show are
U2, V2 and W2
U2
=TEXT(Y2,"mmm")
V2
=IF(DATE(YEAR($Y2),MONTH($Y2)+COLUMN(A1),1)<$Z2,
TEXT(DATE(YEAR($Y2),MONTH($Y2)+COLUMN(A1),1),"mmm" ),"")
copy across to W2
--
Regards

Roger Govier


"curly_lox" wrote in message
...
Roger this looks really good and on practising it in a new worksheet
it
worked perfectly. I already have this giant spreadsheet up though so
when I
go to put in the formula and change which cells its referring to it
shows a
blank.

The Start Month is in Y2, The End Month is in Z2, and the Text Start
Month
is in U2. I'm guessing that the (1) in the formula is whats throwing
it out
slightly

"Roger Govier" wrote:

Hi Emma

With your start date in A1 and end Date in B1 enter in D1
=TEXT(A1,"mmm")
and in E1
=IF(DATE(YEAR($A1),MONTH($A1)+COLUMN(A1),1)<$B1,
TEXT(DATE(YEAR($A1),MONTH($A1)+COLUMN(A1),1),"mmm" ),"")
copy across through F1:O1

--
Regards

Roger Govier


"curly_lox" wrote in message
...
I really need to find a function/formula which will show me the
NAMES
of
months which fall between 2 dates.

Ie 1/1/2007 to 31/3/2007 should show me Jan, Feb, Mar.

I do not want a count of months between 2 dates but what months
fall
between
the 2 dates.

PLEASE HELP!!!
Emma






  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,886
Default List the months between 2 dates

You're very welcome Emma. Thanks for the feedback.

--
Regards

Roger Govier


"curly_lox" wrote in message
...
thank you for this!!

"Roger Govier" wrote:

Hi Emma

Assuming the three cells in which you want the month names to show
are
U2, V2 and W2
U2
=TEXT(Y2,"mmm")
V2
=IF(DATE(YEAR($Y2),MONTH($Y2)+COLUMN(A1),1)<$Z2,
TEXT(DATE(YEAR($Y2),MONTH($Y2)+COLUMN(A1),1),"mmm" ),"")
copy across to W2
--
Regards

Roger Govier


"curly_lox" wrote in message
...
Roger this looks really good and on practising it in a new
worksheet
it
worked perfectly. I already have this giant spreadsheet up though
so
when I
go to put in the formula and change which cells its referring to it
shows a
blank.

The Start Month is in Y2, The End Month is in Z2, and the Text
Start
Month
is in U2. I'm guessing that the (1) in the formula is whats
throwing
it out
slightly

"Roger Govier" wrote:

Hi Emma

With your start date in A1 and end Date in B1 enter in D1
=TEXT(A1,"mmm")
and in E1
=IF(DATE(YEAR($A1),MONTH($A1)+COLUMN(A1),1)<$B1,
TEXT(DATE(YEAR($A1),MONTH($A1)+COLUMN(A1),1),"mmm" ),"")
copy across through F1:O1

--
Regards

Roger Govier


"curly_lox" wrote in message
...
I really need to find a function/formula which will show me the
NAMES
of
months which fall between 2 dates.

Ie 1/1/2007 to 31/3/2007 should show me Jan, Feb, Mar.

I do not want a count of months between 2 dates but what months
fall
between
the 2 dates.

PLEASE HELP!!!
Emma










  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default List the months between 2 dates

Roger I need your help again lol

Ok so I gave up yesterday as I thought I was having a stroke from all the
concentration put into this formula

Let me explain more -

I have a spreadsheet with roughly 20,000 rows of information - each row has
a start date, and end date and I need to produce 12 or more columns which
will show what months fall between the 2 dates (which your formula does when
I copy and paste it into a new spreadsheet but doesn't when I put it into my
original work)

There is other random information like name etc in Columns A:E, and I have
inserted 13 columns (G:S) so that the formula can be copied/dragged and
pasted there.
In column U is the Month (text format)
Column V:X is random info
Column Y is the start date
Column Z is the End date

Ideally I would like this formula to go in column G

I'm sorry for being a moron.

"Roger Govier" wrote:

You're very welcome Emma. Thanks for the feedback.

--
Regards

Roger Govier


"curly_lox" wrote in message
...
thank you for this!!

"Roger Govier" wrote:

Hi Emma

Assuming the three cells in which you want the month names to show
are
U2, V2 and W2
U2
=TEXT(Y2,"mmm")
V2
=IF(DATE(YEAR($Y2),MONTH($Y2)+COLUMN(A1),1)<$Z2,
TEXT(DATE(YEAR($Y2),MONTH($Y2)+COLUMN(A1),1),"mmm" ),"")
copy across to W2
--
Regards

Roger Govier


"curly_lox" wrote in message
...
Roger this looks really good and on practising it in a new
worksheet
it
worked perfectly. I already have this giant spreadsheet up though
so
when I
go to put in the formula and change which cells its referring to it
shows a
blank.

The Start Month is in Y2, The End Month is in Z2, and the Text
Start
Month
is in U2. I'm guessing that the (1) in the formula is whats
throwing
it out
slightly

"Roger Govier" wrote:

Hi Emma

With your start date in A1 and end Date in B1 enter in D1
=TEXT(A1,"mmm")
and in E1
=IF(DATE(YEAR($A1),MONTH($A1)+COLUMN(A1),1)<$B1,
TEXT(DATE(YEAR($A1),MONTH($A1)+COLUMN(A1),1),"mmm" ),"")
copy across through F1:O1

--
Regards

Roger Govier


"curly_lox" wrote in message
...
I really need to find a function/formula which will show me the
NAMES
of
months which fall between 2 dates.

Ie 1/1/2007 to 31/3/2007 should show me Jan, Feb, Mar.

I do not want a count of months between 2 dates but what months
fall
between
the 2 dates.

PLEASE HELP!!!
Emma









  #12   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,886
Default List the months between 2 dates

Hi Emma

No probs.
Insert in G2
=TEXT($Y2,"mmm")
in cell H2
=IF(DATE(YEAR($Y2),MONTH($Y2)+COLUMN(A1),1)<$Z2,
TEXT(DATE(YEAR($Y2),MONTH($Y2)+COLUMN(A1),1),"mmm" ),"")

Drag across through I2:R2
Select G2:H2 down the page, by just double clicking on the fill handle
at the bottom right of H2 after you have selected.

COLUMN(A1) returns the number 1 (because it is the first column). The 1
as part of A1 has no affect at all.
As you copy across, it will change to COLUMN(B1), C1 etc. and return 2
through to 12.
That number is adding to the Month value from cell Y2 to create a new
date, the final 1 in the formula is making the date the 1st of each
month.
MONTH($Y2) will return the month number for that date, YEAR($Y2)
returns the Year number
Date, takes 3 parameters
DATE(year,month,day)
so DATE(2007,1,1) returns 01 Jan 2007 and
TEXT(DATE(2007,1,1),"mmm") will return Jan. If we used "mmmm" it would
return January.

Hopefully it will be a little clearer now as to how it all fits together

--
Regards

Roger Govier


"curly_lox" wrote in message
...
Roger I need your help again lol

Ok so I gave up yesterday as I thought I was having a stroke from all
the
concentration put into this formula

Let me explain more -

I have a spreadsheet with roughly 20,000 rows of information - each
row has
a start date, and end date and I need to produce 12 or more columns
which
will show what months fall between the 2 dates (which your formula
does when
I copy and paste it into a new spreadsheet but doesn't when I put it
into my
original work)

There is other random information like name etc in Columns A:E, and I
have
inserted 13 columns (G:S) so that the formula can be copied/dragged
and
pasted there.
In column U is the Month (text format)
Column V:X is random info
Column Y is the start date
Column Z is the End date

Ideally I would like this formula to go in column G

I'm sorry for being a moron.

"Roger Govier" wrote:

You're very welcome Emma. Thanks for the feedback.

--
Regards

Roger Govier


"curly_lox" wrote in message
...
thank you for this!!

"Roger Govier" wrote:

Hi Emma

Assuming the three cells in which you want the month names to show
are
U2, V2 and W2
U2
=TEXT(Y2,"mmm")
V2
=IF(DATE(YEAR($Y2),MONTH($Y2)+COLUMN(A1),1)<$Z2,
TEXT(DATE(YEAR($Y2),MONTH($Y2)+COLUMN(A1),1),"mmm" ),"")
copy across to W2
--
Regards

Roger Govier


"curly_lox" wrote in message
...
Roger this looks really good and on practising it in a new
worksheet
it
worked perfectly. I already have this giant spreadsheet up
though
so
when I
go to put in the formula and change which cells its referring to
it
shows a
blank.

The Start Month is in Y2, The End Month is in Z2, and the Text
Start
Month
is in U2. I'm guessing that the (1) in the formula is whats
throwing
it out
slightly

"Roger Govier" wrote:

Hi Emma

With your start date in A1 and end Date in B1 enter in D1
=TEXT(A1,"mmm")
and in E1
=IF(DATE(YEAR($A1),MONTH($A1)+COLUMN(A1),1)<$B1,
TEXT(DATE(YEAR($A1),MONTH($A1)+COLUMN(A1),1),"mmm" ),"")
copy across through F1:O1

--
Regards

Roger Govier


"curly_lox" wrote in
message
...
I really need to find a function/formula which will show me
the
NAMES
of
months which fall between 2 dates.

Ie 1/1/2007 to 31/3/2007 should show me Jan, Feb, Mar.

I do not want a count of months between 2 dates but what
months
fall
between
the 2 dates.

PLEASE HELP!!!
Emma











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
how do I sort dates by months? David Excel Discussion (Misc queries) 2 May 7th 07 02:49 PM
Adding months to dates should account for 28-30-31 day months Graham Excel Worksheet Functions 3 February 1st 06 12:06 PM
SUMIF for Dates / Months ? ZMAN Excel Worksheet Functions 5 August 26th 05 02:07 AM
months between 2 dates!!! speary Excel Discussion (Misc queries) 1 August 19th 05 03:22 PM
Need More Help on Dates to Months Xandlyn Excel Worksheet Functions 4 March 12th 05 12:50 PM


All times are GMT +1. The time now is 12:55 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"