ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Function or formula to convert "text" month to number of month? (https://www.excelbanter.com/excel-discussion-misc-queries/69515-re-function-formula-convert-text-month-number-month.html)

Kevin Vaughn

Function or formula to convert "text" month to number of month?
 
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



All times are GMT +1. The time now is 09:35 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com