ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   If Statement (https://www.excelbanter.com/excel-worksheet-functions/127391-if-statement.html)

StephanieH

If Statement
 
I know I'm making this harder than it realy is, but right now I'm stuck. I
need a formula that will perform the following:
IF B4 = X then display "0"
IF C4 = X then display "50"
IF D4 = X then display "125"
IF E4 = X then display "200"

Any help would be appreciated.


Dave F

If Statement
 
=IF(B4="X",0,IF(C4="X",50,IF(D4="X",125,200)))

Dave
--
Brevity is the soul of wit.


"StephanieH" wrote:

I know I'm making this harder than it realy is, but right now I'm stuck. I
need a formula that will perform the following:
IF B4 = X then display "0"
IF C4 = X then display "50"
IF D4 = X then display "125"
IF E4 = X then display "200"

Any help would be appreciated.


Gary''s Student

If Statement
 
I will assume that there will be only one X

=(B4="X")*0+(C4="X")*50+(D4="X")*125+(E4="X")*200

You don't need any IF statements
--
Gary's Student
gsnu200702


"StephanieH" wrote:

I know I'm making this harder than it realy is, but right now I'm stuck. I
need a formula that will perform the following:
IF B4 = X then display "0"
IF C4 = X then display "50"
IF D4 = X then display "125"
IF E4 = X then display "200"

Any help would be appreciated.


Bernard Liengme

If Statement
 
If one and only one of the cell B4:E4 will have an X then use
=50*(C4="X")+125*(D4="X")+200*(E4="X")
If it is progressive (one, two, three or four cells can have an X, then
=50*(C4="X")+75*(D4="X")+75*(E4="X")
But in either case you get an X if B is empty. To overcome this use
=IF(COUNTIF(B4:E4,"X"),50*(C4="X")+125*(D4="X")+20 0*(E4="X"),"")

The test is equivalent to =IF(COUNTIF(B4:E4,"X") 0 That is there is one or
more Xs use the formula else display blank

best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"StephanieH" wrote in message
...
I know I'm making this harder than it realy is, but right now I'm stuck. I
need a formula that will perform the following:
IF B4 = X then display "0"
IF C4 = X then display "50"
IF D4 = X then display "125"
IF E4 = X then display "200"

Any help would be appreciated.




David Biddulph

If Statement
 
=IF(B4="X","0",IF(C4="X","50",IF(D4="X","125",IF(E 4="X","200","answer
undefined"))))

Are you sure that you want the answers to be text strings? If not, take
away the quotes from round the numbers.
--
David Biddulph

"StephanieH" wrote in message
...
I know I'm making this harder than it realy is, but right now I'm stuck. I
need a formula that will perform the following:
IF B4 = X then display "0"
IF C4 = X then display "50"
IF D4 = X then display "125"
IF E4 = X then display "200"

Any help would be appreciated.




Newfie809

If Statement
 
Hi Stephanie,

I don't know if this will help you but, this is what I used myself.

=LOOKUP(B2,{20,40,60,80},{"0","50","125","200"})

--
Newfie


"StephanieH" wrote:

I know I'm making this harder than it realy is, but right now I'm stuck. I
need a formula that will perform the following:
IF B4 = X then display "0"
IF C4 = X then display "50"
IF D4 = X then display "125"
IF E4 = X then display "200"

Any help would be appreciated.



All times are GMT +1. The time now is 11:12 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com