ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Nested IF Statements (https://www.excelbanter.com/excel-discussion-misc-queries/75171-nested-if-statements.html)

Django

Nested IF Statements
 
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

--
Django

Bob Umlas

Nested IF Statements
 
How about a much simpler formula:
=OFFSET(BAE_ActSpent!A8,0,MATCH(BAE_Summary!B1,{"O ct","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

"Django" wrote in message
...
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

--
Django




Django

Nested IF Statements
 
Bob thanks a lot. This was very educational.
--
Django


"Bob Umlas" wrote:

How about a much simpler formula:
=OFFSET(BAE_ActSpent!A8,0,MATCH(BAE_Summary!B1,{"O ct","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

"Django" wrote in message
...
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

--
Django






All times are GMT +1. The time now is 08:58 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com