P Phil Hageman Oct 17, 2003 #1 I need a formula to return three values: If Then blank blank 0 1 0 (AM19-V12)/(P12-V12) Click to expand... Thanks, Phil
I need a formula to return three values: If Then blank blank 0 1 0 (AM19-V12)/(P12-V12) Click to expand... Thanks, Phil
C Chip Pearson Oct 17, 2003 #2 Phil, Try something like =IF(A1="","",IF(A1=0,0,(AM19-V12)/(P12-V12))) -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com (e-mail address removed)
Phil, Try something like =IF(A1="","",IF(A1=0,0,(AM19-V12)/(P12-V12))) -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com (e-mail address removed)
C Chrissy Oct 17, 2003 #3 =IF(ISBLANK(A1),"",IF(A1=0,1,IF(A1>0,(AM19-V12)/(P12-V12)))) The cell you are testing is A1 - change it to what ever you want. That does what you said ..... but ...... if A1 is < 0 or contains characters then you get a "FALSE" as the result. =IF(ISBLANK(A1),"",IF(A1=0,1,IF(A1>0,(AM19-V12)/(P12-V12),"A1<0"))) is probably more like what you want - but change the last bit in quotes. Chrissy.
=IF(ISBLANK(A1),"",IF(A1=0,1,IF(A1>0,(AM19-V12)/(P12-V12)))) The cell you are testing is A1 - change it to what ever you want. That does what you said ..... but ...... if A1 is < 0 or contains characters then you get a "FALSE" as the result. =IF(ISBLANK(A1),"",IF(A1=0,1,IF(A1>0,(AM19-V12)/(P12-V12),"A1<0"))) is probably more like what you want - but change the last bit in quotes. Chrissy.
C Chrissy Oct 17, 2003 #4 Chip Pearson wrote Phil, Try something like =IF(A1="","",IF(A1=0,0,(AM19-V12)/(P12-V12))) Click to expand... --------------------------------^ Should be 1 as OP said Assuming that my ^ lines up with your formula. Chrissy.
Chip Pearson wrote Phil, Try something like =IF(A1="","",IF(A1=0,0,(AM19-V12)/(P12-V12))) Click to expand... --------------------------------^ Should be 1 as OP said Assuming that my ^ lines up with your formula. Chrissy.
C Chip Pearson Oct 17, 2003 #5 Chrissy, Yes, you're right. IT should be 1 not 0. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com (e-mail address removed)
Chrissy, Yes, you're right. IT should be 1 not 0. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com (e-mail address removed)
P Phil Hagmen Oct 17, 2003 #6 Thanks for your reply, Chip. Works great! -----Original Message----- Phil, Try something like =IF(A1="","",IF(A1=0,0,(AM19-V12)/(P12-V12))) -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com (e-mail address removed) . Click to expand...
Thanks for your reply, Chip. Works great! -----Original Message----- Phil, Try something like =IF(A1="","",IF(A1=0,0,(AM19-V12)/(P12-V12))) -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com (e-mail address removed) . Click to expand...
P Phil Hageman Oct 17, 2003 #7 Thanks for your Chrissy. Your first formula is essentially the same as Chips. Works great!