Link to home
Start Free TrialLog in
Avatar of jjc9809
jjc9809

asked on

An Excel 2007 Question

Hi everyone,

I have an Excel 2007 Spreadsheet that has a drop down list with months OCT through Sept.  The drop down list is in Cell O7.  If OCT  through DEC is selected, I want the Year
"2010" to be put in P7 right beside it.  If Jan through Sep is selected I want the Year "2011" placed in P7 right beside it.   How can this be done in simple coding or with an If Function or some other way.  I thought about DLOOKUP but I just can't get it to work.  I could List all of the Years in another sheet for Column A and the Month Name in Column B and do this some way.  But, I want the most simplest way to do it.  If it can be done logically with an IF.  I might like this better.  I do not know.
ASKER CERTIFIED SOLUTION
Avatar of Ardhendu Sarangi
Ardhendu Sarangi
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This in P7?

=if(or(o7="oct",o7="nov",o7="dec"),"2010,"2011")
check this
Book1.xls
Can you not put the full month and date in the dropdown?

One slightly different way around it, Oct Nov & Dec are the only months with the initial letters O N & D, so:

=IF(OR(LEFT(O7,1)="O",LEFT(O7,1)="N",LEFT(O7,1)="D"),2010,2011)

Thanks
Rob H
Avatar of jjc9809
jjc9809

ASKER

Excellent!