W
Walter Briscoe
This is the inverse need of my question "Mapping integers to strings" in
<http://groups.google.com/g/7097feea/t/3b458343e881c994/d/7e69c03bea746b
4b>
I want to map English language month names to month numbers in 1..12.
So far, I have
=VLOOKUP($AL9,{"April",4;"August",8;"December",12;"February",2;"January"
,1;"July",7;"June",6;"March",3;"May",5;"November",11;"October",10;"Septe
mber",9},2,FALSE)
=HLOOKUP($AL9,{"April","August","December","February","January","July","
June","March","May","November","October","September";4,8,12,2,1,7,6,3,5,
11,10,9},2,FALSE)
and
=MATCH($AL9,{"January","February","March","April","May","June","July","A
ugust","September","October","November","December"},0)
AL9 contains a month name.
These formulas seem inappropriately complicated for mapping month names
to month numbers, but are general purpose for mapping arbitrary sets of
strings to numbers.
Is there a simpler MonthNumber formula, I have missed?
I now answer my own question: =MONTH("1-" & $AL9 & "-1900")
<http://groups.google.com/g/7097feea/t/3b458343e881c994/d/7e69c03bea746b
4b>
I want to map English language month names to month numbers in 1..12.
So far, I have
=VLOOKUP($AL9,{"April",4;"August",8;"December",12;"February",2;"January"
,1;"July",7;"June",6;"March",3;"May",5;"November",11;"October",10;"Septe
mber",9},2,FALSE)
=HLOOKUP($AL9,{"April","August","December","February","January","July","
June","March","May","November","October","September";4,8,12,2,1,7,6,3,5,
11,10,9},2,FALSE)
and
=MATCH($AL9,{"January","February","March","April","May","June","July","A
ugust","September","October","November","December"},0)
AL9 contains a month name.
These formulas seem inappropriately complicated for mapping month names
to month numbers, but are general purpose for mapping arbitrary sets of
strings to numbers.
Is there a simpler MonthNumber formula, I have missed?
I now answer my own question: =MONTH("1-" & $AL9 & "-1900")