![]() |
How do I create a multi formula IF function in Excel?
|
=if(condition1,responce1,If(condition2,responce2,r esponce3)
or =if(and(condition1,condition2),responce1,reponce2) -----Original Message----- . |
Here's is the formula that I am trying to use, I want to get an answer using a variable (B13) based on whether the cell is 1,2,3,4,5,6 I'm 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")))))) -- Wazza ------------------------------------------------------------------------ Wazza's Profile: http://www.excelforum.com/member.php...o&userid=16225 View this thread: http://www.excelforum.com/showthread...hreadid=276384 |
So where is my original formula wrong? When I punch in the random number 1-6 it just puts the corresponding formula on the screen and does not calcualte it i.e when I put it 1 D22 results in =0.2 instead of just 0.2 -- Wazza ------------------------------------------------------------------------ Wazza's Profile: http://www.excelforum.com/member.php...o&userid=16225 View this thread: http://www.excelforum.com/showthread...hreadid=276384 |
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 )))))) -- Regards Frank Kabel Frankfurt, Germany "Wazza" schrieb im Newsbeitrag ... Here's is the formula that I am trying to use, I want to get an answer using a variable (B13) based on whether the cell is 1,2,3,4,5,6 I'm 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")))))) -- Wazza --------------------------------------------------------------------- --- Wazza's Profile: http://www.excelforum.com/member.php...o&userid=16225 View this thread: http://www.excelforum.com/showthread...hreadid=276384 |
Hi
=0.2+(C22-1)*(B13-0.4)/5 Arvi Laanemets "Wazza" wrote in message ... Here's is the formula that I am trying to use, I want to get an answer using a variable (B13) based on whether the cell is 1,2,3,4,5,6 I'm 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")))))) -- Wazza ------------------------------------------------------------------------ Wazza's Profile: http://www.excelforum.com/member.php...o&userid=16225 View this thread: http://www.excelforum.com/showthread...hreadid=276384 |
Hi
don't enclose the return values in apostrophes nor use the equation sign -- Regards Frank Kabel Frankfurt, Germany "Wazza" schrieb im Newsbeitrag ... So where is my original formula wrong? When I punch in the random number 1-6 it just puts the corresponding formula on the screen and does not calcualte it i.e when I put it 1 D22 results in =0.2 instead of just 0.2 -- Wazza --------------------------------------------------------------------- --- Wazza's Profile: http://www.excelforum.com/member.php...o&userid=16225 View this thread: http://www.excelforum.com/showthread...hreadid=276384 |
Thanks Frank :) -- Wazza ------------------------------------------------------------------------ Wazza's Profile: http://www.excelforum.com/member.php...o&userid=16225 View this thread: http://www.excelforum.com/showthread...hreadid=276384 |
lol
that is a "little bit" simpler than my formula -- Regards Frank Kabel Frankfurt, Germany "Arvi Laanemets" schrieb im Newsbeitrag ... Hi =0.2+(C22-1)*(B13-0.4)/5 Arvi Laanemets "Wazza" wrote in message ... Here's is the formula that I am trying to use, I want to get an answer using a variable (B13) based on whether the cell is 1,2,3,4,5,6 I'm 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")))))) -- Wazza --------------------------------------------------------------------- --- Wazza's Profile: http://www.excelforum.com/member.php...o&userid=16225 View this thread: http://www.excelforum.com/showthread...hreadid=276384 |
All times are GMT +1. The time now is 01:48 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com