ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Exceeding Limit on Nested IF Statements (https://www.excelbanter.com/excel-worksheet-functions/178777-exceeding-limit-nested-if-statements.html)

rwohlner

Exceeding Limit on Nested IF Statements
 
I am converting a budget spreadsheet from Lotus 1-2-3 to Excel. Excel's
limit on nested IF statements is creating my biggest challenge. I have
budget and actual columns next to one another for each month. A Lotus
formula reads from a cell identifying the current month that requires 12 if
statements. [i.e. (If month = January, add one column, if february add two
columns, ...if December add 12 columns.)] What is my Excel alternative to
nested if's in this situation?

Tyro[_2_]

Exceeding Limit on Nested IF Statements
 
Who could say? Show us your data, then we can provide you with an Excel
formula. You might find that IF is not involved, at all, in Excel. With a
data input example and a resultant answer, we can help.

Tyro

"rwohlner" wrote in message
...
I am converting a budget spreadsheet from Lotus 1-2-3 to Excel. Excel's
limit on nested IF statements is creating my biggest challenge. I have
budget and actual columns next to one another for each month. A Lotus
formula reads from a cell identifying the current month that requires 12
if
statements. [i.e. (If month = January, add one column, if february add
two
columns, ...if December add 12 columns.)] What is my Excel alternative to
nested if's in this situation?




Martin Fishlock

Exceeding Limit on Nested IF Statements
 
Hi,

One solution is to use an indirect function:

=SUM(INDIRECT("R5C2:R5C"&$B$7+1,FALSE))

In this example the data is in row 5 and starts at column b (R5C2) and it
continues for the next n columns as shown by B7 which holds 1 for Jan, 2 for
Feb etc.

you need to adjust the b7 value by the indented columns here one column, so
plus one.

This solution requires that you have a separate sheet linked to source data
to get the results with twelve consecutive columns of data.

--
Hope this helps
Martin Fishlock, Bangkok, Thailand
Please do not forget to rate this reply.


"rwohlner" wrote:

I am converting a budget spreadsheet from Lotus 1-2-3 to Excel. Excel's
limit on nested IF statements is creating my biggest challenge. I have
budget and actual columns next to one another for each month. A Lotus
formula reads from a cell identifying the current month that requires 12 if
statements. [i.e. (If month = January, add one column, if february add two
columns, ...if December add 12 columns.)] What is my Excel alternative to
nested if's in this situation?


Martin Fishlock

Exceeding Limit on Nested IF Statements
 
Hi,

One solution is to use an indirect function:

=SUM(INDIRECT("R5C2:R5C"&$B$7+1,FALSE))

In this example the data is in row 5 and starts at column b (R5C2) and it
continues for the next n columns as shown by B7 which holds 1 for Jan, 2 for
Feb etc.

you need to adjust the b7 value by the indented columns here one column, so
plus one.

This solution requires that you have a separate sheet linked to source data
to get the results with twelve consecutive columns of data.

--
Hope this helps
Martin Fishlock, Bangkok, Thailand
Please do not forget to rate this reply.


"rwohlner" wrote:

I am converting a budget spreadsheet from Lotus 1-2-3 to Excel. Excel's
limit on nested IF statements is creating my biggest challenge. I have
budget and actual columns next to one another for each month. A Lotus
formula reads from a cell identifying the current month that requires 12 if
statements. [i.e. (If month = January, add one column, if february add two
columns, ...if December add 12 columns.)] What is my Excel alternative to
nested if's in this situation?


rwohlner

Exceeding Limit on Nested IF Statements
 
Tyro:

Please walk me through how I can show you a sample.

Thanks.


"Tyro" wrote:

Who could say? Show us your data, then we can provide you with an Excel
formula. You might find that IF is not involved, at all, in Excel. With a
data input example and a resultant answer, we can help.

Tyro

"rwohlner" wrote in message
...
I am converting a budget spreadsheet from Lotus 1-2-3 to Excel. Excel's
limit on nested IF statements is creating my biggest challenge. I have
budget and actual columns next to one another for each month. A Lotus
formula reads from a cell identifying the current month that requires 12
if
statements. [i.e. (If month = January, add one column, if february add
two
columns, ...if December add 12 columns.)] What is my Excel alternative to
nested if's in this situation?






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

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