Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 157
Default Month name to number of months YTD

I have a sheet with lots of year to date data by month, the last column on
the right, which is AN, contains the abbreviated name of the month for each
row, formatted as m to show JAN, FEB,etc. This sheet is updated daily for
year to date info. I am trying to figure out an average month to date, so am
trying to figure out how to assign my JAN(in column AN) as the number of
months YTD. So for instance in this months column AN, it displays JUL next
to each row of information. in AO, I would like it to show 7 months current
YTD, then next month show 8 and so on. That way I can use that cell to
figure my average. How would I write a formula to do that?

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 733
Default Month name to number of months YTD

Tasha wrote...
....
. . . So for instance in this months column AN, it displays JUL next
to each row of information. in AO, I would like it to show 7 months
current YTD, then next month show 8 and so on. . . .

....

One way,

=MATCH(AN2,{"Jan","Feb","Mar","Apr","May","Jun","J ul","Aug",
"Sep","Oct","Nov","Dec"},0)

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 733
Default Month name to number of months YTD

Harlan Grove wrote...
....
One way,

=MATCH(AN2,{"Jan","Feb","Mar","Apr","May","Jun"," Jul","Aug",
"Sep","Oct","Nov","Dec"},0)


And a simpler way,

=MONTH(AN2&"-1")


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 157
Default Month name to number of months YTD

That worked perfect!!! Thank you thank you!!!

"Harlan Grove" wrote:

Tasha wrote...
....
. . . So for instance in this months column AN, it displays JUL next
to each row of information. in AO, I would like it to show 7 months
current YTD, then next month show 8 and so on. . . .

....

One way,

=MATCH(AN2,{"Jan","Feb","Mar","Apr","May","Jun","J ul","Aug",
"Sep","Oct","Nov","Dec"},0)


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 157
Default Month name to number of months YTD

Always love the shorter ways :)
Thanks!!!

"Harlan Grove" wrote:

Harlan Grove wrote...
....
One way,

=MATCH(AN2,{"Jan","Feb","Mar","Apr","May","Jun"," Jul","Aug",
"Sep","Oct","Nov","Dec"},0)


And a simpler way,

=MONTH(AN2&"-1")





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,345
Default Month name to number of months YTD

Harlan,

I know that you will have a reason for it so can I ask you why:

=MONTH(AN2&"-1")


When =MONTH(AN2&"0"), (or any other number from -99 to 99), seems to do the
same thing?


--
Regards,

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"Harlan Grove" wrote in message
ups.com...
Harlan Grove wrote...
...
One way,

=MATCH(AN2,{"Jan","Feb","Mar","Apr","May","Jun", "Jul","Aug",
"Sep","Oct","Nov","Dec"},0)


And a simpler way,

=MONTH(AN2&"-1")





  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 733
Default Month name to number of months YTD

"Sandy Mann" wrote...
I know that you will have a reason for it so can I ask you why:

=MONTH(AN2&"-1")

When =MONTH(AN2&"0"), (or any other number from -99 to 99), seems
to do the same thing?

....

And they don't need to be quoted. Wouldn't have occurred to me that
Excel would treat, e.g., "JUL0" as a valid date string.

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,345
Default Month name to number of months YTD

Thank you Harlan.

The earliest reference that I can find in Google to it being used is Aladin
Akyurek in February 2002 but I find that the new Google format is not a good
as it used to be.

--
Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"Harlan Grove" wrote in message
oups.com...
"Sandy Mann" wrote...
I know that you will have a reason for it so can I ask you why:

=MONTH(AN2&"-1")

When =MONTH(AN2&"0"), (or any other number from -99 to 99), seems
to do the same thing?

...

And they don't need to be quoted. Wouldn't have occurred to me that
Excel would treat, e.g., "JUL0" as a valid date string.




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
I want a formula to list months, from any given month, forward Barbara Excel Worksheet Functions 3 October 6th 06 08:35 AM
calculation sales of particular month among months of sale Rao Ratan Singh New Users to Excel 2 February 3rd 06 12:47 PM
Add one Month in the next cell for several months/years heater Excel Discussion (Misc queries) 3 November 16th 05 11:46 PM
HOW TO SUBTRACT A YEAR+MONTH AND SHOW DIF IN MONTHS? noles fan Excel Worksheet Functions 2 October 1st 05 05:32 PM
how to calculate total months from month/year patti Excel Discussion (Misc queries) 1 December 8th 04 09:50 PM


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

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

About Us

"It's about Microsoft Excel"