Donate SIGN UP

If command on excel

Avatar Image
Humpy69 | 21:03 Fri 23rd Jan 2009 | Technology
16 Answers
Does anyone know the correct 'IF' statement for the following criteria

The answer in Cell C3 depends on the value in Cell B3 so if B3 = Win the value in C3 = 12 but if the value in B3 = Loss then the value in C3 = 15.

Sorry if this sound confussing

Regards
Gravatar

Answers

1 to 16 of 16rss feed

Best Answer

No best answer has yet been selected by Humpy69. Once a best answer has been selected, it will be shown here.

For more on marking an answer as the "Best Answer", please visit our FAQ.
I've read your question about 10 times now but I still can't make any sense of it sorry
Question Author
I'll try and explain again.. Maybe I'm wrong and it can't be done:


A B C D E.....
1 Enter Time Win / Loss Points
2 09:00 AM Win 12
3 09:30 AM Loss 15
4 10:00 AM Loss 15


So assuming the above excel s/sheet where B2=Win C2 is 12 but where B= loss then the figure in C would = 15

Does this help!!!
Would the loss be a negative number?
Question Author
No it could be anything
I was asking in case you were wanting to take any losses from the wins to leave a balance.
Question Author
Oh I bum I cant explain it any clearer!!!!!
Don't give up on us yet!!!! You said the values in C could be anything but at the start, you seemed to imply it would be either 12 or 15, what is the spreadsheet for?
Question Author
Its a FTSE 100 spreadsheet and the results are either a "WIN" or a "LOSS" depending on this outcome effects the value in the next cell ei if its a "WIN" the value need to be 12 if it's a "LOSS" the value needs to be 15.

Does this make it any clearer

:)
put in cell b3

=IF(c3="win", 12,15)
=IF(B1="WIN",12,IF(B1="loss",15,IF(B1="",0 ))) this will return a "0" if there is neither win nor loss in the cell
^ I got that the wrong way round.. sorry

put into cell c3 (the one you want to show the 12 or 15)

=IF(b3="win", 12,15)
Question Author
Thanks for your help!!!

Leave those with me and I'll give them a try

Put ma statement in C1 by the way, the statement by Chuck will return a value of 15 iin the B cell if a cell in the C column is empty.
If you paste the statements and use auto fill you'll see what I mean.
TCL is quite correct, the basic if function I supplied will return a false value no mater whats in the cell if it's not "win" his is a far better method.
i was going to say use IF and Else statements.... but thinking Visual Basic and C++!!! very similar though

1 to 16 of 16rss feed

Do you know the answer?

If command on excel

Answer Question >>