Asking for Formula ~ Thanks!

R

raspywench

I am trying to write a formula for the following:

If A2=A then use IF statement 1, If A2=B then use IF statement 2, If
A2=C then use IF statement 3.

I have the if statements written and working (like the one below) but
cannot put this all together and nest them properly.

IF(Production!AA4<='Control Page'!$A$4,'Control
Page'!$B$4,IF(Production!AA4<='Control Page'!$A$5,'Control
Page'!$B$5,IF(Production!AA4<='Control Page'!$A$6,'Control
Page'!$B$6,IF(Production!AA4<='Control Page'!$A$7,'Control
Page'!$B$7,IF(Production!AA4<='Control Page'!$A$8,'Control
Page'!$B$8,IF(Production!AA4<='Control Page'!$A$9,'Control
Page'!$B$9,IF(Production!AA4>'Control Page'!$A$9,'Control
Page'!$B$10)))))))*Production!Y4

Any help would be much appreciated.

Thank you!
 
B

Biff

Hi!

Here's an idea.....

As I understand your post you have 3 IF formulas like:
IF(Production!AA4<='Control Page'!$A$4,'Control
Page'!$B$4,IF(Production!AA4<='Control Page'!$A$5,'Control
Page'!$B$5,IF(Production!AA4<='Control Page'!$A$6,'Control
Page'!$B$6,IF(Production!AA4<='Control Page'!$A$7,'Control
Page'!$B$7,IF(Production!AA4<='Control Page'!$A$8,'Control
Page'!$B$8,IF(Production!AA4<='Control Page'!$A$9,'Control
Page'!$B$9,IF(Production!AA4>'Control Page'!$A$9,'Control
Page'!$B$10)))))))*Production!Y4

Give each of these formulas a defined name, something like IF1, IF2, IF3.

Then:

=CHOOSE(MATCH(A2,{"A","B","C"},0),IF1,IF2,IF3)

Biff
 
B

Biff

OR, more simply......

Just put each of those IF formulas in a cell, say:

The result of IF 1 is in cell C1
The result of IF 2 is in cell D1
The result of IF 3 is in cell E1

Then:

=CHOOSE(MATCH(A2,{"A","B","C"},0),C1,D1,E1)

Biff
 

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