Months

Chris Davison

MrExcel MVP
Joined
Feb 15, 2002
Messages
1,790
Evening all,

if in A1 I have "Feb" as text, what's the formula to convert this into a value ?

ie 2 (2 being the second month in a year)

or if I have "Sep" then I want 9, etc etc

Embarrasingly, I couldn't figure it out without using a VLOOKUP and now I can't sleep

many thanks
Chris
:)
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
thanks Tom,

this gives me #VALUE error though

The cell just contains "Feb", not "February" or an actual date formatted as MM, just plain old text "Feb"......

*sigh*
 
Upvote 0
no worries Tom... I appreciate you looking at it....

the "sigh" is at myself for not being able to figure it out, it seems such a silly n simple thing !
 
Upvote 0
Hi Chris,

There is no straightforward way to do this. Without a lookup, you can use

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

Good night,
Jay
 
Upvote 0

Forum statistics

Threads
1,214,399
Messages
6,119,279
Members
448,884
Latest member
chuffman431a

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top