Lookup Function in Excel

999HelpPlease

New Member
Joined
Jul 16, 2014
Messages
35
I am trying to use the lookup function in excel.

In Cell M1 I have a drop down list of all the months of the year with just using the first three letters of the month.

In cell M2 I have the following lookup statement: =LOOKUP(M1,{"Jan";"Feb";"Mar";"Apr";"May";"Jun";"Jul";"Aug";"Sep";"Oct";"Nov";"Dec"},{1;2;3;4;5;6;7;8;9;10;11;12})

In cell M2 I want it to populate whichever number the month represents. Example : if Jan was in M1, then 1 would be in M2, if Dec was in M1, then 12 would be in M2.

For some reason some months work and some do not.

I have never used this function before am I doing something wrong or is there a better way of doing this?
 
Lookup requires the lookup table to be sorted in ascending order.
So Apr would be first, Sep would be last.
 
Last edited:
Upvote 0
That said, there are much easier ways to convert the 3 digit abbreviated month string into the month number..

Try
=MONTH(1&M1)
 
Upvote 0

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