Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ken Ken is offline
external usenet poster
 
Posts: 590
Default Help with Nested IF Statements

Hello,

I have a nested IF statement that needs to be much larger than it is.
Currently, there are six IF statements all nested into another IF. I need to
add eight more IF's into the formula, but Excel won't allow it. Below is the
formula. The formula does a HLookup at rangename AccountNumbers.

This is the formula as it is currently written:
=IF(H13="","",IF(A13="","",HLOOKUP(H13,AccountNumb ers,IF(A13="A",2,IF(A13="B",3,IF(A13="C",4,IF(A13= "D",5,IF(A13="E",6,""))))),FALSE)))

Any help anyone can offer would be great! Maybe there is another way of
doing this.
--
Ken
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,276
Default Help with Nested IF Statements


Hi,
you will not get it working with if statements, please post a sample of your
data and what you want to achieve and I will look for other solutions
"Ken" wrote:

Hello,

I have a nested IF statement that needs to be much larger than it is.
Currently, there are six IF statements all nested into another IF. I need to
add eight more IF's into the formula, but Excel won't allow it. Below is the
formula. The formula does a HLookup at rangename AccountNumbers.

This is the formula as it is currently written:
=IF(H13="","",IF(A13="","",HLOOKUP(H13,AccountNumb ers,IF(A13="A",2,IF(A13="B",3,IF(A13="C",4,IF(A13= "D",5,IF(A13="E",6,""))))),FALSE)))

Any help anyone can offer would be great! Maybe there is another way of
doing this.
--
Ken

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ken Ken is offline
external usenet poster
 
Posts: 590
Default Help with Nested IF Statements

Hi Eduardo,

I would like the account number in a cell (B2) to change based on the value
in an adjascent cell (B3) and the value of a 3rd cell (B1). So if (B3) =
CAR502, and (B1) is "C", the lookup finds that value (B2) in the table and
gives me the coorisponding value in row "C" of the table. The problem is
that i have 13 rows of data. The function works fine, except i have too many
rows to nest in the IF statement.

I hope this helps.
--
Ken


"Eduardo" wrote:


Hi,
you will not get it working with if statements, please post a sample of your
data and what you want to achieve and I will look for other solutions
"Ken" wrote:

Hello,

I have a nested IF statement that needs to be much larger than it is.
Currently, there are six IF statements all nested into another IF. I need to
add eight more IF's into the formula, but Excel won't allow it. Below is the
formula. The formula does a HLookup at rangename AccountNumbers.

This is the formula as it is currently written:
=IF(H13="","",IF(A13="","",HLOOKUP(H13,AccountNumb ers,IF(A13="A",2,IF(A13="B",3,IF(A13="C",4,IF(A13= "D",5,IF(A13="E",6,""))))),FALSE)))

Any help anyone can offer would be great! Maybe there is another way of
doing this.
--
Ken

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,276
Default Help with Nested IF Statements

Ok, in your example you give only 2 variables CAR502 and C, provide me with a
complete example, as per your spreadsheet

"Ken" wrote:

Hi Eduardo,

I would like the account number in a cell (B2) to change based on the value
in an adjascent cell (B3) and the value of a 3rd cell (B1). So if (B3) =
CAR502, and (B1) is "C", the lookup finds that value (B2) in the table and
gives me the coorisponding value in row "C" of the table. The problem is
that i have 13 rows of data. The function works fine, except i have too many
rows to nest in the IF statement.

I hope this helps.
--
Ken


"Eduardo" wrote:


Hi,
you will not get it working with if statements, please post a sample of your
data and what you want to achieve and I will look for other solutions
"Ken" wrote:

Hello,

I have a nested IF statement that needs to be much larger than it is.
Currently, there are six IF statements all nested into another IF. I need to
add eight more IF's into the formula, but Excel won't allow it. Below is the
formula. The formula does a HLookup at rangename AccountNumbers.

This is the formula as it is currently written:
=IF(H13="","",IF(A13="","",HLOOKUP(H13,AccountNumb ers,IF(A13="A",2,IF(A13="B",3,IF(A13="C",4,IF(A13= "D",5,IF(A13="E",6,""))))),FALSE)))

Any help anyone can offer would be great! Maybe there is another way of
doing this.
--
Ken

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Help with Nested IF Statements

I assume you need to expand this portion:

IF(A13="A",2,IF(A13="B",3......


One way to do it would be to use another "lookup".

X1:X10 = letters A, B, C, D etc.

Then, you'd replace the nested if with something like this:

MATCH(A13,X1:X10,0)+1

--
Biff
Microsoft Excel MVP


"Ken" wrote in message
...
Hello,

I have a nested IF statement that needs to be much larger than it is.
Currently, there are six IF statements all nested into another IF. I need
to
add eight more IF's into the formula, but Excel won't allow it. Below is
the
formula. The formula does a HLookup at rangename AccountNumbers.

This is the formula as it is currently written:
=IF(H13="","",IF(A13="","",HLOOKUP(H13,AccountNumb ers,IF(A13="A",2,IF(A13="B",3,IF(A13="C",4,IF(A13= "D",5,IF(A13="E",6,""))))),FALSE)))

Any help anyone can offer would be great! Maybe there is another way of
doing this.
--
Ken





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Nested IF statements Karrisac15 New Users to Excel 1 July 19th 07 08:06 PM
Nested IF statements maacmaac Excel Discussion (Misc queries) 0 January 23rd 06 09:22 PM
Nested If/Then statements qwik6 Excel Worksheet Functions 3 December 9th 05 03:38 AM
what is the max no. of nested Ifs can an If Statements have in EXC StevenE Excel Discussion (Misc queries) 1 June 27th 05 03:03 PM
Do I need nested IF statements? Jaramya Excel Worksheet Functions 1 November 5th 04 09:10 PM


All times are GMT +1. The time now is 06:27 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"