An Excel 2007 Question

jjc9809
jjc9809 used Ask the Experts™
on
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.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Sr. Project Manager
Commented:
This can be done with a simple IF condition like this -

=IF(MONTH("01/"&O7)<=9,2011,2010)

See attached file

thanks,
Ardhendu
Ardhendu SarangiSr. Project Manager

Commented:
File attached...
EE-ID-27238421.xlsx
This in P7?

=if(or(o7="oct",o7="nov",o7="dec"),"2010,"2011")
Become a CompTIA Certified Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

Commented:
check this
Book1.xls
Rob HensonFinance Analyst

Commented:
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

Author

Commented:
Excellent!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial