How do I create a multi formula IF function in Excel?

G

Guest

=if(condition1,responce1,If(condition2,responce2,responce3)
or
=if(and(condition1,condition2),responce1,reponce2)
 
W

Wazza

Here's is the formula that I am trying to use, I want to get an answe
using a variable (B13) based on whether the cell is 1,2,3,4,5,6 I'
fairly new to this so any help would be awesome.

=IF(C22=1,"=0.2",IF(C22=2,"=((B13-0.4)/5)+0.2",IF(C22=3,"=(((B13-0.4)/5)*2)+0.2",IF(C22=4,"=(((B13-0.4)/5)*3)+0.2",IF(C22=5,"=(((B13-0.4)/5)*4)+0.2",IF(C22=6,"=B13-0.2")))))
 
W

Wazza

So where is my original formula wrong? When I punch in the random numbe
1-6 it just puts the corresponding formula on the screen and does no
calcualte it i.e when I put it 1 D22 results in =0.2 instead of jus
0.
 
F

Frank Kabel

Hi
try:
=IF(C22=1,0.2,IF(C22=2,(B13-0.4)/5+0.2,IF(C22=3,((B13-0.4)/5)*2+0.2,IF(
C22=4,((B13-0.4)/5)*3+0.2,IF(C22=5,((B13-0.4)/5)*4+0.2,IF(C22=6,B13-0.2
))))))
 
F

Frank Kabel

Hi
don't enclose the return values in apostrophes nor use the equation
sign
 

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