Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
PM
 
Posts: n/a
Default How to extract month number from month name

I have a workbook that have multiple workshhets in it. The worksheets are
called January, February, March ..... (Please note thare are a couple of
worksheets which are not month related). Within each month sheet I have a
column that has a reference number 01 for Jan, 02 for Feb, 03 for March... At
the moment the reference numbers are typed in manually.

Is there a way where I can extract the month number from the month name and
automatically insert it into the reference number column?

Any help would be appreciated.
  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

This formula will extract the month name from the sheet tab and calculate
its index

=MONTH(DAY(TODAY())&"-"&MID(CELL("filename",A1),FIND("]",CELL("filename",A1)
)+1,255)&"-"&YEAR(TODAY()))

--

HTH

RP
(remove nothere from the email address if mailing direct)


"PM" wrote in message
...
I have a workbook that have multiple workshhets in it. The worksheets are
called January, February, March ..... (Please note thare are a couple of
worksheets which are not month related). Within each month sheet I have a
column that has a reference number 01 for Jan, 02 for Feb, 03 for March...

At
the moment the reference numbers are typed in manually.

Is there a way where I can extract the month number from the month name

and
automatically insert it into the reference number column?

Any help would be appreciated.



  #3   Report Post  
PM
 
Posts: n/a
Default

Bob,

Many thanks for you time and formula, works a treat.

Pank

"Bob Phillips" wrote:

This formula will extract the month name from the sheet tab and calculate
its index

=MONTH(DAY(TODAY())&"-"&MID(CELL("filename",A1),FIND("]",CELL("filename",A1)
)+1,255)&"-"&YEAR(TODAY()))

--

HTH

RP
(remove nothere from the email address if mailing direct)


"PM" wrote in message
...
I have a workbook that have multiple workshhets in it. The worksheets are
called January, February, March ..... (Please note thare are a couple of
worksheets which are not month related). Within each month sheet I have a
column that has a reference number 01 for Jan, 02 for Feb, 03 for March...

At
the moment the reference numbers are typed in manually.

Is there a way where I can extract the month number from the month name

and
automatically insert it into the reference number column?

Any help would be appreciated.




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
Seed numbers for random number generation, uniform distribution darebo Excel Discussion (Misc queries) 3 April 21st 23 09:02 PM
how to get week number in month in excel ? ikin Charts and Charting in Excel 2 January 16th 05 05:54 PM
How to format a number in Indian style in Excel? Victor_alb Excel Discussion (Misc queries) 2 December 21st 04 04:21 AM
How do I convert a serial number to the month, day, and year in E. Judy Excel Discussion (Misc queries) 2 December 15th 04 03:38 PM
Is there a template for a number of people traveling by month? CP Excel Discussion (Misc queries) 0 December 13th 04 05:31 PM


All times are GMT +1. The time now is 11:56 AM.

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"