Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Rajula
 
Posts: n/a
Default Nested If workaround - How does it work for other cells dynamicall

I used the following link and solved the problem of using more than 7 nested
if statements http://www.cpearson.com/excel/nested.htm.

I now have 3 defined names (3 formulas). Master, onetoseven and eighttonine.
Master is onetoseven and eighttonine combined.

I am using Master in cell C1. Now i need to use Master in cell C2, C3,
.....etc for hundreds of rows.

My problem is 'onetoseven' has
IF(AND(A1="H",B1="H"),"H", IF(AND(A1="H",B1="M"),"H",
IF(AND(A1="H",B1="L"),"M", IF(AND(A1="M",B1="H"),"M",
IF(AND(A1="M",B1="M"),"M",
IF(AND(A1="M",B1="L"),"L", IF(AND(A1="L",B1="H"),"M", )))))))

and 'eighttonine' has
IF(AND(A1="L",B1="M"),"L", IF(AND(A1="L",B1="L"),"L",))

Now in Cell C2 i need to get IF statements of A2, B2, In C3 i have to get
for A3,B3... and so forth. dynamically..

Is there a solution to this.

Regards
Rajula

  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default Nested If workaround - How does it work for other cells dynamicall

Since each one of these conditions is mutually exclusive, you could just
concatenate those strings:

=IF(AND(A1="H",B1="H"),"H","")
&IF(AND(A1="H",B1="M"),"H","")
&IF(AND(A1="H",B1="L"),"M","")
&IF(AND(A1="M",B1="H"),"M","")
&IF(AND(A1="M",B1="M"),"M","")
&IF(AND(A1="M",B1="L"),"L","")
&IF(AND(A1="L",B1="H"),"M","")
(and so forth)


Rajula wrote:

I used the following link and solved the problem of using more than 7 nested
if statements http://www.cpearson.com/excel/nested.htm.

I now have 3 defined names (3 formulas). Master, onetoseven and eighttonine.
Master is onetoseven and eighttonine combined.

I am using Master in cell C1. Now i need to use Master in cell C2, C3,
....etc for hundreds of rows.

My problem is 'onetoseven' has
IF(AND(A1="H",B1="H"),"H", IF(AND(A1="H",B1="M"),"H",
IF(AND(A1="H",B1="L"),"M", IF(AND(A1="M",B1="H"),"M",
IF(AND(A1="M",B1="M"),"M",
IF(AND(A1="M",B1="L"),"L", IF(AND(A1="L",B1="H"),"M", )))))))

and 'eighttonine' has
IF(AND(A1="L",B1="M"),"L", IF(AND(A1="L",B1="L"),"L",))

Now in Cell C2 i need to get IF statements of A2, B2, In C3 i have to get
for A3,B3... and so forth. dynamically..

Is there a solution to this.

Regards
Rajula


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
Rajula
 
Posts: n/a
Default Nested If workaround - How does it work for other cells dynami

Hi,

It giving all kinds of funny problems.
Out of the 3 defined formula, Only onetoseven works. eighttonine formula
doesnt work using master.

Formula doesnt work for A1, B1 or A2,B2 etc.... Bcos in the defined names
the formula is for A1, B1...

Regards


"Dave Peterson" wrote:

Since each one of these conditions is mutually exclusive, you could just
concatenate those strings:

=IF(AND(A1="H",B1="H"),"H","")
&IF(AND(A1="H",B1="M"),"H","")
&IF(AND(A1="H",B1="L"),"M","")
&IF(AND(A1="M",B1="H"),"M","")
&IF(AND(A1="M",B1="M"),"M","")
&IF(AND(A1="M",B1="L"),"L","")
&IF(AND(A1="L",B1="H"),"M","")
(and so forth)


Rajula wrote:

I used the following link and solved the problem of using more than 7 nested
if statements http://www.cpearson.com/excel/nested.htm.

I now have 3 defined names (3 formulas). Master, onetoseven and eighttonine.
Master is onetoseven and eighttonine combined.

I am using Master in cell C1. Now i need to use Master in cell C2, C3,
....etc for hundreds of rows.

My problem is 'onetoseven' has
IF(AND(A1="H",B1="H"),"H", IF(AND(A1="H",B1="M"),"H",
IF(AND(A1="H",B1="L"),"M", IF(AND(A1="M",B1="H"),"M",
IF(AND(A1="M",B1="M"),"M",
IF(AND(A1="M",B1="L"),"L", IF(AND(A1="L",B1="H"),"M", )))))))

and 'eighttonine' has
IF(AND(A1="L",B1="M"),"L", IF(AND(A1="L",B1="L"),"L",))

Now in Cell C2 i need to get IF statements of A2, B2, In C3 i have to get
for A3,B3... and so forth. dynamically..

Is there a solution to this.

Regards
Rajula


--

Dave Peterson

  #4   Report Post  
Posted to microsoft.public.excel.misc
Bryan Hessey
 
Posts: n/a
Default Nested If workaround - How does it work for other cells dynamicall


Hi Rajula,

If you are having problems with multiple If statements matching the
various combinations in A1 and B1, have you considered the Index
function as an alternative.

As per the attached, you can set any values into A and B and select
which corresponding values will be valid or will be ignored, and you
can add new items to the table sufficient to cover your needs.

The statement then becomes:


=IF(ISERROR(OR(MATCH(A1,F$10:F$14,0),MATCH(B1,G$9: K$9,0))),"",INDEX(G$10:K$14,MATCH(A1,F$10:F$14,0), MATCH(B1,G$9:K$9,0)))

Just another option which could suit your needs and remove the
guesswork out of what result a combination pair (A+Bn) will produce.

attachment:

HTH

Rajula Wrote:
Hi,

It giving all kinds of funny problems.
Out of the 3 defined formula, Only onetoseven works. eighttonine
formula
doesnt work using master.

Formula doesnt work for A1, B1 or A2,B2 etc.... Bcos in the defined
names
the formula is for A1, B1...

Regards


"Dave Peterson" wrote:

Since each one of these conditions is mutually exclusive, you could

just
concatenate those strings:

=IF(AND(A1="H",B1="H"),"H","")
&IF(AND(A1="H",B1="M"),"H","")
&IF(AND(A1="H",B1="L"),"M","")
&IF(AND(A1="M",B1="H"),"M","")
&IF(AND(A1="M",B1="M"),"M","")
&IF(AND(A1="M",B1="L"),"L","")
&IF(AND(A1="L",B1="H"),"M","")
(and so forth)


Rajula wrote:

I used the following link and solved the problem of using more than

7 nested
if statements http://www.cpearson.com/excel/nested.htm.

I now have 3 defined names (3 formulas). Master, onetoseven and

eighttonine.
Master is onetoseven and eighttonine combined.

I am using Master in cell C1. Now i need to use Master in cell C2,

C3,
....etc for hundreds of rows.

My problem is 'onetoseven' has
IF(AND(A1="H",B1="H"),"H", IF(AND(A1="H",B1="M"),"H",
IF(AND(A1="H",B1="L"),"M", IF(AND(A1="M",B1="H"),"M",
IF(AND(A1="M",B1="M"),"M",
IF(AND(A1="M",B1="L"),"L", IF(AND(A1="L",B1="H"),"M", )))))))

and 'eighttonine' has
IF(AND(A1="L",B1="M"),"L", IF(AND(A1="L",B1="L"),"L",))

Now in Cell C2 i need to get IF statements of A2, B2, In C3 i have

to get
for A3,B3... and so forth. dynamically..

Is there a solution to this.

Regards
Rajula


--

Dave Peterson



--
Bryan Hessey
------------------------------------------------------------------------
Bryan Hessey's Profile: http://www.excelforum.com/member.php...o&userid=21059
View this thread: http://www.excelforum.com/showthread...hreadid=534670

  #5   Report Post  
Posted to microsoft.public.excel.misc
Bryan Hessey
 
Posts: n/a
Default Nested If workaround - How does it work for other cells dynamicall


Hi Rajula,

If you are still having problems, have you considered using the Index
function to select matches of A1 & B1.
As per the attached, you can allocate values to various combinations,
shown as green for A1 and purple for B1 to produce the result you
require shown as yellow.

The statement is:


=IF(ISERROR(OR(MATCH(A1,F$10:F$14,0),MATCH(B1,G$9: K$9,0))),"",INDEX(G$10:K$14,MATCH(A1,F$10:F$14,0), MATCH(B1,G$9:K$9,0)))

and the table can be increased to match your current and future needs,
as is shown in the coloured zone.

Just another possibility.

Attached:
http://www.excelforum.com/attachment...3&d=1145621998

Hope this helps

Rajula Wrote:
Hi,

It giving all kinds of funny problems.
Out of the 3 defined formula, Only onetoseven works. eighttonine
formula
doesnt work using master.

Formula doesnt work for A1, B1 or A2,B2 etc.... Bcos in the defined
names
the formula is for A1, B1...

Regards


"Dave Peterson" wrote:

Since each one of these conditions is mutually exclusive, you could

just
concatenate those strings:

=IF(AND(A1="H",B1="H"),"H","")
&IF(AND(A1="H",B1="M"),"H","")
&IF(AND(A1="H",B1="L"),"M","")
&IF(AND(A1="M",B1="H"),"M","")
&IF(AND(A1="M",B1="M"),"M","")
&IF(AND(A1="M",B1="L"),"L","")
&IF(AND(A1="L",B1="H"),"M","")
(and so forth)


Rajula wrote:

I used the following link and solved the problem of using more than

7 nested
if statements http://www.cpearson.com/excel/nested.htm.

I now have 3 defined names (3 formulas). Master, onetoseven and

eighttonine.
Master is onetoseven and eighttonine combined.

I am using Master in cell C1. Now i need to use Master in cell C2,

C3,
....etc for hundreds of rows.

My problem is 'onetoseven' has
IF(AND(A1="H",B1="H"),"H", IF(AND(A1="H",B1="M"),"H",
IF(AND(A1="H",B1="L"),"M", IF(AND(A1="M",B1="H"),"M",
IF(AND(A1="M",B1="M"),"M",
IF(AND(A1="M",B1="L"),"L", IF(AND(A1="L",B1="H"),"M", )))))))

and 'eighttonine' has
IF(AND(A1="L",B1="M"),"L", IF(AND(A1="L",B1="L"),"L",))

Now in Cell C2 i need to get IF statements of A2, B2, In C3 i have

to get
for A3,B3... and so forth. dynamically..

Is there a solution to this.

Regards
Rajula


--

Dave Peterson



+-------------------------------------------------------------------+
|Filename: Mif.zip |
|Download: http://www.excelforum.com/attachment.php?postid=4673 |
+-------------------------------------------------------------------+

--
Bryan Hessey
------------------------------------------------------------------------
Bryan Hessey's Profile: http://www.excelforum.com/member.php...o&userid=21059
View this thread: http://www.excelforum.com/showthread...hreadid=534670



  #6   Report Post  
Posted to microsoft.public.excel.misc
Rajula
 
Posts: n/a
Default Nested If workaround - How does it work for other cells dynami

Hi Bryan,

Let me explain the problem.
There are 3 columns A, B, C
A can be High, Med, Low. B Can be High, Med, Low.
If A is High & B is High, then C is High. If A is High & B is Med, then C is
High.
If A is High and B is Low, then C is medium, If A is Med & B is High, then C
is High, If A is Med & B is Med, then C is Med..,.... so on an so forth..

Columns A & B i am giving a dropdown to select from High, Med, Low. And
based on the values selected in A & B, C should get Values High, Med, Low.

This is the actual problem.

Regards


"Bryan Hessey" wrote:


Hi Rajula,

If you are still having problems, have you considered using the Index
function to select matches of A1 & B1.
As per the attached, you can allocate values to various combinations,
shown as green for A1 and purple for B1 to produce the result you
require shown as yellow.

The statement is:


=IF(ISERROR(OR(MATCH(A1,F$10:F$14,0),MATCH(B1,G$9: K$9,0))),"",INDEX(G$10:K$14,MATCH(A1,F$10:F$14,0), MATCH(B1,G$9:K$9,0)))

and the table can be increased to match your current and future needs,
as is shown in the coloured zone.

Just another possibility.

Attached:
http://www.excelforum.com/attachment...3&d=1145621998

Hope this helps

Rajula Wrote:
Hi,

It giving all kinds of funny problems.
Out of the 3 defined formula, Only onetoseven works. eighttonine
formula
doesnt work using master.

Formula doesnt work for A1, B1 or A2,B2 etc.... Bcos in the defined
names
the formula is for A1, B1...

Regards


"Dave Peterson" wrote:

Since each one of these conditions is mutually exclusive, you could

just
concatenate those strings:

=IF(AND(A1="H",B1="H"),"H","")
&IF(AND(A1="H",B1="M"),"H","")
&IF(AND(A1="H",B1="L"),"M","")
&IF(AND(A1="M",B1="H"),"M","")
&IF(AND(A1="M",B1="M"),"M","")
&IF(AND(A1="M",B1="L"),"L","")
&IF(AND(A1="L",B1="H"),"M","")
(and so forth)


Rajula wrote:

I used the following link and solved the problem of using more than

7 nested
if statements http://www.cpearson.com/excel/nested.htm.

I now have 3 defined names (3 formulas). Master, onetoseven and

eighttonine.
Master is onetoseven and eighttonine combined.

I am using Master in cell C1. Now i need to use Master in cell C2,

C3,
....etc for hundreds of rows.

My problem is 'onetoseven' has
IF(AND(A1="H",B1="H"),"H", IF(AND(A1="H",B1="M"),"H",
IF(AND(A1="H",B1="L"),"M", IF(AND(A1="M",B1="H"),"M",
IF(AND(A1="M",B1="M"),"M",
IF(AND(A1="M",B1="L"),"L", IF(AND(A1="L",B1="H"),"M", )))))))

and 'eighttonine' has
IF(AND(A1="L",B1="M"),"L", IF(AND(A1="L",B1="L"),"L",))

Now in Cell C2 i need to get IF statements of A2, B2, In C3 i have

to get
for A3,B3... and so forth. dynamically..

Is there a solution to this.

Regards
Rajula

--

Dave Peterson



+-------------------------------------------------------------------+
|Filename: Mif.zip |
|Download: http://www.excelforum.com/attachment.php?postid=4673 |
+-------------------------------------------------------------------+

--
Bryan Hessey
------------------------------------------------------------------------
Bryan Hessey's Profile: http://www.excelforum.com/member.php...o&userid=21059
View this thread: http://www.excelforum.com/showthread...hreadid=534670


  #7   Report Post  
Posted to microsoft.public.excel.misc
Bryan Hessey
 
Posts: n/a
Default Nested If workaround - How does it work for other cells dynamicall


Rajula,

Irrespective of how you get the contents into cells A or B, the
Index/Match will set column C accordingly as per the Mif.wks.

You can use a dropdown that's fine. The table reflects the values for
where A value crosses with B value, and this will be selected when A1
and B1 are set.

--

Rajula Wrote:
Hi Bryan,

Let me explain the problem.
There are 3 columns A, B, C
A can be High, Med, Low. B Can be High, Med, Low.
If A is High & B is High, then C is High. If A is High & B is Med, then
C is
High.
If A is High and B is Low, then C is medium, If A is Med & B is High,
then C
is High, If A is Med & B is Med, then C is Med..,.... so on an so
forth..

Columns A & B i am giving a dropdown to select from High, Med, Low.
And
based on the values selected in A & B, C should get Values High, Med,
Low.

This is the actual problem.

Regards


"Bryan Hessey" wrote:


Hi Rajula,

If you are still having problems, have you considered using the

Index
function to select matches of A1 & B1.
As per the attached, you can allocate values to various

combinations,
shown as green for A1 and purple for B1 to produce the result you
require shown as yellow.

The statement is:



=IF(ISERROR(OR(MATCH(A1,F$10:F$14,0),MATCH(B1,G$9: K$9,0))),"",INDEX(G$10:K$14,MATCH(A1,F$10:F$14,0), MATCH(B1,G$9:K$9,0)))

and the table can be increased to match your current and future

needs,
as is shown in the coloured zone.

Just another possibility.

Attached:

http://www.excelforum.com/attachment...3&d=1145621998

Hope this helps

Rajula Wrote:
Hi,

It giving all kinds of funny problems.
Out of the 3 defined formula, Only onetoseven works. eighttonine
formula
doesnt work using master.

Formula doesnt work for A1, B1 or A2,B2 etc.... Bcos in the

defined
names
the formula is for A1, B1...

Regards


"Dave Peterson" wrote:

Since each one of these conditions is mutually exclusive, you

could
just
concatenate those strings:

=IF(AND(A1="H",B1="H"),"H","")
&IF(AND(A1="H",B1="M"),"H","")
&IF(AND(A1="H",B1="L"),"M","")
&IF(AND(A1="M",B1="H"),"M","")
&IF(AND(A1="M",B1="M"),"M","")
&IF(AND(A1="M",B1="L"),"L","")
&IF(AND(A1="L",B1="H"),"M","")
(and so forth)


Rajula wrote:

I used the following link and solved the problem of using more

than
7 nested
if statements http://www.cpearson.com/excel/nested.htm.

I now have 3 defined names (3 formulas). Master, onetoseven

and
eighttonine.
Master is onetoseven and eighttonine combined.

I am using Master in cell C1. Now i need to use Master in cell

C2,
C3,
....etc for hundreds of rows.

My problem is 'onetoseven' has
IF(AND(A1="H",B1="H"),"H", IF(AND(A1="H",B1="M"),"H",
IF(AND(A1="H",B1="L"),"M", IF(AND(A1="M",B1="H"),"M",
IF(AND(A1="M",B1="M"),"M",
IF(AND(A1="M",B1="L"),"L", IF(AND(A1="L",B1="H"),"M",

)))))))

and 'eighttonine' has
IF(AND(A1="L",B1="M"),"L", IF(AND(A1="L",B1="L"),"L",))

Now in Cell C2 i need to get IF statements of A2, B2, In C3 i

have
to get
for A3,B3... and so forth. dynamically..

Is there a solution to this.

Regards
Rajula

--

Dave Peterson




+-------------------------------------------------------------------+
|Filename: Mif.zip

|
|Download: http://www.excelforum.com/attachment.php?postid=4673

|

+-------------------------------------------------------------------+

--
Bryan Hessey

------------------------------------------------------------------------
Bryan Hessey's Profile:

http://www.excelforum.com/member.php...o&userid=21059
View this thread:

http://www.excelforum.com/showthread...hreadid=534670




--
Bryan Hessey
------------------------------------------------------------------------
Bryan Hessey's Profile: http://www.excelforum.com/member.php...o&userid=21059
View this thread: http://www.excelforum.com/showthread...hreadid=534670

  #8   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default Nested If workaround - How does it work for other cells dynami

I didn't use any names.

Rajula wrote:

Hi,

It giving all kinds of funny problems.
Out of the 3 defined formula, Only onetoseven works. eighttonine formula
doesnt work using master.

Formula doesnt work for A1, B1 or A2,B2 etc.... Bcos in the defined names
the formula is for A1, B1...

Regards

"Dave Peterson" wrote:

Since each one of these conditions is mutually exclusive, you could just
concatenate those strings:

=IF(AND(A1="H",B1="H"),"H","")
&IF(AND(A1="H",B1="M"),"H","")
&IF(AND(A1="H",B1="L"),"M","")
&IF(AND(A1="M",B1="H"),"M","")
&IF(AND(A1="M",B1="M"),"M","")
&IF(AND(A1="M",B1="L"),"L","")
&IF(AND(A1="L",B1="H"),"M","")
(and so forth)


Rajula wrote:

I used the following link and solved the problem of using more than 7 nested
if statements http://www.cpearson.com/excel/nested.htm.

I now have 3 defined names (3 formulas). Master, onetoseven and eighttonine.
Master is onetoseven and eighttonine combined.

I am using Master in cell C1. Now i need to use Master in cell C2, C3,
....etc for hundreds of rows.

My problem is 'onetoseven' has
IF(AND(A1="H",B1="H"),"H", IF(AND(A1="H",B1="M"),"H",
IF(AND(A1="H",B1="L"),"M", IF(AND(A1="M",B1="H"),"M",
IF(AND(A1="M",B1="M"),"M",
IF(AND(A1="M",B1="L"),"L", IF(AND(A1="L",B1="H"),"M", )))))))

and 'eighttonine' has
IF(AND(A1="L",B1="M"),"L", IF(AND(A1="L",B1="L"),"L",))

Now in Cell C2 i need to get IF statements of A2, B2, In C3 i have to get
for A3,B3... and so forth. dynamically..

Is there a solution to this.

Regards
Rajula


--

Dave Peterson


--

Dave Peterson
  #9   Report Post  
Posted to microsoft.public.excel.misc
Rajula
 
Posts: n/a
Default Nested If workaround - How does it work for other cells dynami


Yeah.. the problem is i cant use more than 7 IF statements. And i have 9 IF
statements.

"Dave Peterson" wrote:

I didn't use any names.

Rajula wrote:

Hi,

It giving all kinds of funny problems.
Out of the 3 defined formula, Only onetoseven works. eighttonine formula
doesnt work using master.

Formula doesnt work for A1, B1 or A2,B2 etc.... Bcos in the defined names
the formula is for A1, B1...

Regards

"Dave Peterson" wrote:

Since each one of these conditions is mutually exclusive, you could just
concatenate those strings:

=IF(AND(A1="H",B1="H"),"H","")
&IF(AND(A1="H",B1="M"),"H","")
&IF(AND(A1="H",B1="L"),"M","")
&IF(AND(A1="M",B1="H"),"M","")
&IF(AND(A1="M",B1="M"),"M","")
&IF(AND(A1="M",B1="L"),"L","")
&IF(AND(A1="L",B1="H"),"M","")
(and so forth)


Rajula wrote:

I used the following link and solved the problem of using more than 7 nested
if statements http://www.cpearson.com/excel/nested.htm.

I now have 3 defined names (3 formulas). Master, onetoseven and eighttonine.
Master is onetoseven and eighttonine combined.

I am using Master in cell C1. Now i need to use Master in cell C2, C3,
....etc for hundreds of rows.

My problem is 'onetoseven' has
IF(AND(A1="H",B1="H"),"H", IF(AND(A1="H",B1="M"),"H",
IF(AND(A1="H",B1="L"),"M", IF(AND(A1="M",B1="H"),"M",
IF(AND(A1="M",B1="M"),"M",
IF(AND(A1="M",B1="L"),"L", IF(AND(A1="L",B1="H"),"M", )))))))

and 'eighttonine' has
IF(AND(A1="L",B1="M"),"L", IF(AND(A1="L",B1="L"),"L",))

Now in Cell C2 i need to get IF statements of A2, B2, In C3 i have to get
for A3,B3... and so forth. dynamically..

Is there a solution to this.

Regards
Rajula

--

Dave Peterson


--

Dave Peterson

  #10   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default Nested If workaround - How does it work for other cells dynami

You can't nest more than 7 levels. I didn't nest any.

Rajula wrote:

Yeah.. the problem is i cant use more than 7 IF statements. And i have 9 IF
statements.

"Dave Peterson" wrote:

I didn't use any names.

Rajula wrote:

Hi,

It giving all kinds of funny problems.
Out of the 3 defined formula, Only onetoseven works. eighttonine formula
doesnt work using master.

Formula doesnt work for A1, B1 or A2,B2 etc.... Bcos in the defined names
the formula is for A1, B1...

Regards

"Dave Peterson" wrote:

Since each one of these conditions is mutually exclusive, you could just
concatenate those strings:

=IF(AND(A1="H",B1="H"),"H","")
&IF(AND(A1="H",B1="M"),"H","")
&IF(AND(A1="H",B1="L"),"M","")
&IF(AND(A1="M",B1="H"),"M","")
&IF(AND(A1="M",B1="M"),"M","")
&IF(AND(A1="M",B1="L"),"L","")
&IF(AND(A1="L",B1="H"),"M","")
(and so forth)


Rajula wrote:

I used the following link and solved the problem of using more than 7 nested
if statements http://www.cpearson.com/excel/nested.htm.

I now have 3 defined names (3 formulas). Master, onetoseven and eighttonine.
Master is onetoseven and eighttonine combined.

I am using Master in cell C1. Now i need to use Master in cell C2, C3,
....etc for hundreds of rows.

My problem is 'onetoseven' has
IF(AND(A1="H",B1="H"),"H", IF(AND(A1="H",B1="M"),"H",
IF(AND(A1="H",B1="L"),"M", IF(AND(A1="M",B1="H"),"M",
IF(AND(A1="M",B1="M"),"M",
IF(AND(A1="M",B1="L"),"L", IF(AND(A1="L",B1="H"),"M", )))))))

and 'eighttonine' has
IF(AND(A1="L",B1="M"),"L", IF(AND(A1="L",B1="L"),"L",))

Now in Cell C2 i need to get IF statements of A2, B2, In C3 i have to get
for A3,B3... and so forth. dynamically..

Is there a solution to this.

Regards
Rajula

--

Dave Peterson


--

Dave Peterson


--

Dave Peterson


  #11   Report Post  
Posted to microsoft.public.excel.misc
BruceP
 
Posts: n/a
Default Nested If workaround - How does it work for other cells dynamicall


Rajula,

Another possibility would be to use a hidden StdData sheet, and assign
point values to High, Medium & Low (i.e., High = 3, Med = 2, Low = 1).
In your corresponding StdData sheet cells, you could determine the point
value with IFs, LOOKUP (etc..many choices of tools). Your StdData C
cell could then have a very simple formula to determine the value
threshold (val 4 = rslt1, 3 val < 2 = rslt2, etc). This should
net you fewer possibilities. You could then post the col C values onto
your presentation sheet.


--
BruceP
------------------------------------------------------------------------
BruceP's Profile: http://www.excelforum.com/member.php...o&userid=33653
View this thread: http://www.excelforum.com/showthread...hreadid=534670

  #12   Report Post  
Posted to microsoft.public.excel.misc
Rajula
 
Posts: n/a
Default Nested If workaround - How does it work for other cells dynami

Hey Dave, i should thankyou for this..
Its works... GREAT.

"Dave Peterson" wrote:

I didn't use any names.

Rajula wrote:

Hi,

It giving all kinds of funny problems.
Out of the 3 defined formula, Only onetoseven works. eighttonine formula
doesnt work using master.

Formula doesnt work for A1, B1 or A2,B2 etc.... Bcos in the defined names
the formula is for A1, B1...

Regards

"Dave Peterson" wrote:

Since each one of these conditions is mutually exclusive, you could just
concatenate those strings:

=IF(AND(A1="H",B1="H"),"H","")
&IF(AND(A1="H",B1="M"),"H","")
&IF(AND(A1="H",B1="L"),"M","")
&IF(AND(A1="M",B1="H"),"M","")
&IF(AND(A1="M",B1="M"),"M","")
&IF(AND(A1="M",B1="L"),"L","")
&IF(AND(A1="L",B1="H"),"M","")
(and so forth)


Rajula wrote:

I used the following link and solved the problem of using more than 7 nested
if statements http://www.cpearson.com/excel/nested.htm.

I now have 3 defined names (3 formulas). Master, onetoseven and eighttonine.
Master is onetoseven and eighttonine combined.

I am using Master in cell C1. Now i need to use Master in cell C2, C3,
....etc for hundreds of rows.

My problem is 'onetoseven' has
IF(AND(A1="H",B1="H"),"H", IF(AND(A1="H",B1="M"),"H",
IF(AND(A1="H",B1="L"),"M", IF(AND(A1="M",B1="H"),"M",
IF(AND(A1="M",B1="M"),"M",
IF(AND(A1="M",B1="L"),"L", IF(AND(A1="L",B1="H"),"M", )))))))

and 'eighttonine' has
IF(AND(A1="L",B1="M"),"L", IF(AND(A1="L",B1="L"),"L",))

Now in Cell C2 i need to get IF statements of A2, B2, In C3 i have to get
for A3,B3... and so forth. dynamically..

Is there a solution to this.

Regards
Rajula

--

Dave Peterson


--

Dave Peterson

  #13   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default Nested If workaround - How does it work for other cells dynami

You could add more conditions to this a little easier:

=IF((LEN(A1)*LEN(B1))<1,"",
VLOOKUP(A1&B1,{"HH","H"; "HM","H"; "HL","M";
"MH","M"; "MM","M"; "ML","L"; "LH","M"},2,FALSE))

(all one cell)



Rajula wrote:

Hey Dave, i should thankyou for this..
Its works... GREAT.

"Dave Peterson" wrote:

I didn't use any names.

Rajula wrote:

Hi,

It giving all kinds of funny problems.
Out of the 3 defined formula, Only onetoseven works. eighttonine formula
doesnt work using master.

Formula doesnt work for A1, B1 or A2,B2 etc.... Bcos in the defined names
the formula is for A1, B1...

Regards

"Dave Peterson" wrote:

Since each one of these conditions is mutually exclusive, you could just
concatenate those strings:

=IF(AND(A1="H",B1="H"),"H","")
&IF(AND(A1="H",B1="M"),"H","")
&IF(AND(A1="H",B1="L"),"M","")
&IF(AND(A1="M",B1="H"),"M","")
&IF(AND(A1="M",B1="M"),"M","")
&IF(AND(A1="M",B1="L"),"L","")
&IF(AND(A1="L",B1="H"),"M","")
(and so forth)


Rajula wrote:

I used the following link and solved the problem of using more than 7 nested
if statements http://www.cpearson.com/excel/nested.htm.

I now have 3 defined names (3 formulas). Master, onetoseven and eighttonine.
Master is onetoseven and eighttonine combined.

I am using Master in cell C1. Now i need to use Master in cell C2, C3,
....etc for hundreds of rows.

My problem is 'onetoseven' has
IF(AND(A1="H",B1="H"),"H", IF(AND(A1="H",B1="M"),"H",
IF(AND(A1="H",B1="L"),"M", IF(AND(A1="M",B1="H"),"M",
IF(AND(A1="M",B1="M"),"M",
IF(AND(A1="M",B1="L"),"L", IF(AND(A1="L",B1="H"),"M", )))))))

and 'eighttonine' has
IF(AND(A1="L",B1="M"),"L", IF(AND(A1="L",B1="L"),"L",))

Now in Cell C2 i need to get IF statements of A2, B2, In C3 i have to get
for A3,B3... and so forth. dynamically..

Is there a solution to this.

Regards
Rajula

--

Dave Peterson


--

Dave Peterson


--

Dave Peterson
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
merge cells button doesn't work Mark F Excel Worksheet Functions 5 April 3rd 23 07:30 PM
Why doesn't this nested IF statement work? Brandoni Excel Worksheet Functions 4 April 19th 06 10:26 PM
Nested subtotals don't work properly after applying recommendation Karin Meijer Excel Worksheet Functions 0 May 20th 05 02:22 PM
Nested IF - Work Around for 7 nest Max AEICHEN Excel Worksheet Functions 1 April 21st 05 12:09 AM
Help adding text values Texas-DC_271 Excel Worksheet Functions 7 January 15th 05 11:14 PM


All times are GMT +1. The time now is 09:00 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"