formulas

I

iceheart

I need to make a formula that contains mutiple variables and different
answers for the cell.

If G40=1 and G41= 250 G42 will equal 50
If G40=1 and G41= 200 G42will equal 37
If G40=1 and G41= 150 G42 will equal 25
If G40=2 and G41= 250 G42 will equal 37
If G40=2 and G41= 200 G42 will equal 25
If G40=2 and G41= 150 G42 will equal 19

Any suggestions would be appreciated.
 
M

Myrna Larson

Are these the only values that can be found in G40 and G41? If so, I would set
up a table that looks like this:

150 200 250
1 25 37 50
2 19 25 37

Let's say you put that in L1:O3

The formula would be =INDEX($M$2:$O$3,G40,G41/50-2)
 
J

Jay

I need to make a formula that contains mutiple variables and different
answers for the cell.

If G40=1 and G41= 250 G42 will equal 50
If G40=1 and G41= 200 G42will equal 37
If G40=1 and G41= 150 G42 will equal 25
If G40=2 and G41= 250 G42 will equal 37
If G40=2 and G41= 200 G42 will equal 25
If G40=2 and G41= 150 G42 will equal 19

One way:

=LOOKUP(1000*G40+G41,
{1150;1200;1250;2150;2200;2250},
{25;37;50;19;25;37})
 
Top