Validation List to fill adjacent cell with IF?

B

braeden13

I am trying to set up a drop down list (list is set up ok) that has the
months of the year in it to correspond with a number for the month using IF,
but it doesn't seem to work. Here is the formula I was trying in cell A2:

IF(A1="January",(1))*IF(A1="February",(2))...etc.

The value in A2 comes back as 0 or #NAME. Obviously this is not the way to
set this up, but I am unsure how to make it work. Is there somewhere I can
look this up or does someone have a formula to use? I use Excel 2002 and
2003.
 
B

Bob Phillips

How about

=MONTH(DATEVALUE("01-"&A1&"-2000"))

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top