Nested IF Statements

D

Django

Appreciate it if anyone can solve my problem. I am using Nested IF statements
to pull out data based on the month of the year:

=IF(BAE_Summary!$B$1="Jan",BAE_ActSpent!E8,IF(BAE_Summary!$B$1="Feb",
BAE_ActSpent!F8,IF(BAE_Summary!$B$1="Mar", BAE_ActSpent!G8,
IF(BAE_Summary!$B$1="Apr", BAE_ActSpent!H8,IF(BAE_Summary!$B$1="May",
BAE_ActSpent!I8,IF(BAE_Summary!$B$1="Jun", BAE_ActSpent!J8,FALSE))))))

=IF(BAE_Summary!$B$1="Jul",BAE_ActSpent!K8,IF(BAE_Summary!$B$1="Aug",
BAE_ActSpent!L8,IF(BAE_Summary!$B$1="Sep", BAE_ActSpent!M8,
IF(BAE_Summary!$B$1="Oct", BAE_ActSpent!B8,IF(BAE_Summary!$B$1="Nov",
BAE_ActSpent!C8,IF(BAE_Summary!$B$1="Dec", BAE_ActSpent!D,FALSE))))))

Everything seems to work fine until I get to January. #NAME$ shows up and I
cannot figure out what is wrong. Has anyone ever ran into this situation?
Appreciate any help I can get on this problem
 
B

Bob Umlas

How about a much simpler formula:
=OFFSET(BAE_ActSpent!A8,0,MATCH(BAE_Summary!B1,{"Oct","Nov","Dec","Jan","Feb
","Mar","Apr","May","Jun","Jul","Aug","Sep"},0))
and could even be simpler if the months (beginning with Oct) were in a range
of cells, like A1:A12:
=OFFSET(BAE_ActSpent!A8,0,MATCH(BAE_Summary!B1,A1:A12,0))

Bob Umlas
Excel MVP
 

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