![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Millbank, London, UK
Posts: 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 |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Mar 2002
Location: Cincinnati, Ohio, USA
Posts: 6,824
|
=Month(A1) Tom [ This Message was edited by: TsTom on 2002-04-26 17:40 ] |
|
|
|
|
|
#3 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Millbank, London, UK
Posts: 1,790
|
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* |
|
|
|
|
|
#4 |
|
Board Regular
Join Date: Mar 2002
Location: Cincinnati, Ohio, USA
Posts: 6,824
|
Misunderstood you
|
|
|
|
|
|
#5 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Millbank, London, UK
Posts: 1,790
|
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 ! |
|
|
|
|
|
#6 |
|
MrExcel MVP
Join Date: Mar 2002
Location: Chicago, IL USA
Posts: 2,042
|
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 |
|
|
|
|
|
#7 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Millbank, London, UK
Posts: 1,790
|
s'cool, thanks Jay
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|