Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Is there a function to convert the text name of a month (e.g., "April") to
its corresponding number (e.g., "4")? If not, the only workaround I can think of would be a long, nested IF function (e.g., =IF(A1="January", "1",IF(A1="February", "2", . . . etc. . . )))))))) TIA for any help offered, Steve |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
You're welcome.
-- Kevin Vaughn "Steve Vincent" wrote: Perfect! Thanks Kevin! Steve "Kevin Vaughn" wrote: With April in B18, this worked for me: =MONTH(DATEVALUE(B18 & " 1, 2006")) -- Kevin Vaughn "Steve Vincent" wrote: Is there a function to convert the text name of a month (e.g., "April") to its corresponding number (e.g., "4")? If not, the only workaround I can think of would be a long, nested IF function (e.g., =IF(A1="January", "1",IF(A1="February", "2", . . . etc. . . )))))))) TIA for any help offered, Steve |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Does anoyone know how to do the reverse. Convert month number to text.
Ex: 1 = Jan, 2= Feb "Steve Vincent" wrote: Is there a function to convert the text name of a month (e.g., "April") to its corresponding number (e.g., "4")? If not, the only workaround I can think of would be a long, nested IF function (e.g., =IF(A1="January", "1",IF(A1="February", "2", . . . etc. . . )))))))) TIA for any help offered, Steve |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
There is no built in conversion either way but it is easy to make one
=VLOOKUP(A1,{1,"Jan";2,"Feb";3,"Mar";4,"Apr";5,"Ma y";6,"Jun";7,"Jul";8,"Aug";9,"Sep";10,"Oct";11,"No v";12,"Dec"},2,0) with your number in A1 You might want to wrap it in an IF function in case a1 is blank =IF(A1="","",VLOOKUP(A1,{1,"Jan";2,"Feb";3,"Mar";4 ,"Apr";5,"May";6,"Jun";7,"Jul";8,"Aug";9,"Sep";10, "Oct";11,"Nov";12,"Dec"},2,0)) -- Regards, Peo Sjoblom "Jennnifer" wrote in message ... Does anoyone know how to do the reverse. Convert month number to text. Ex: 1 = Jan, 2= Feb "Steve Vincent" wrote: Is there a function to convert the text name of a month (e.g., "April") to its corresponding number (e.g., "4")? If not, the only workaround I can think of would be a long, nested IF function (e.g., =IF(A1="January", "1",IF(A1="February", "2", . . . etc. . . )))))))) TIA for any help offered, Steve |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
=text(date(2007,a1,1),"mmm")
if A1 contained the number (1-12). Jennnifer wrote: Does anoyone know how to do the reverse. Convert month number to text. Ex: 1 = Jan, 2= Feb "Steve Vincent" wrote: Is there a function to convert the text name of a month (e.g., "April") to its corresponding number (e.g., "4")? If not, the only workaround I can think of would be a long, nested IF function (e.g., =IF(A1="January", "1",IF(A1="February", "2", . . . etc. . . )))))))) TIA for any help offered, Steve -- Dave Peterson |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thanks Dave!
"Dave Peterson" wrote: =text(date(2007,a1,1),"mmm") if A1 contained the number (1-12). Jennnifer wrote: Does anoyone know how to do the reverse. Convert month number to text. Ex: 1 = Jan, 2= Feb "Steve Vincent" wrote: Is there a function to convert the text name of a month (e.g., "April") to its corresponding number (e.g., "4")? If not, the only workaround I can think of would be a long, nested IF function (e.g., =IF(A1="January", "1",IF(A1="February", "2", . . . etc. . . )))))))) TIA for any help offered, Steve -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Formula checking multiple worksheets | Excel Worksheet Functions | |||
Formula checking multiple worksheets | Excel Worksheet Functions | |||
referencing named formula using INDIRECT function | Excel Worksheet Functions | |||
CONVERT Function Disappered in Excel | Excel Discussion (Misc queries) | |||
Formula to convert to month | Excel Worksheet Functions |