Formula if win or lose

cdpaul

New Member
Joined
Sep 2, 2005
Messages
41
Office Version
  1. 365
Platform
  1. Windows
Hi,
I can do very basic sums but I'm trying to create a sheet that would give the result depending on whether the result cell is "Win" or "Lose".

I've attached a screenshot and what I'm looking for is:
M3 to be E3*F3 if L3 is Win or -E3 if Lose.
One further thing if possible if L3 is blank then M3 is blank ie M3 looks empty unless/until Win or Lose is entered.

Much appreciate any help

Thanks
Paul
Sheet.jpg
Sheet.jpg
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Like this?

BTW, I suggest that you investigate XL2BB for providing sample data to make it easier for helpers by not having to manually type out sample data to test with.

20 09 10.xlsm
EFGHIJKLM
3102.05Win20.50
4102.24Win22.40
5102.01Lose-10.00
6102.13Lose-10.00
7 
Win lose
Cell Formulas
RangeFormula
M3:M7M3=IF(L3="","",IF(L3="Win",E3*F3,-E3))
 
Upvote 0
Another option are this, which exist as a ready made Sheet on the internet. Og hvis du er Svensker, så er skemaet lavet på Dansk.
I'm not sure, if I'm allowed to insert a Link, but I take the risk: https://oddsekspert.dk/odds-regnskab-skabelon/

Odds-Skabelon1.xlsx
ABCDEFGHIJK
1
2ØkonomiStatistik
3Indskud kr 85,00 Vundet1
4Profit kr 89,25 Tabt0
5Gen. Profit kr 89,25 Antal 1
6ROI %105%Gns. Odds2,05
7
8DatoSamlet OddsIndskudGevinstProfitResultat
909-09-20202,05 85,00 kr. 174,25 kr. 89,25 kr. W
10 - kr. - kr.
11 - kr. - kr.
12 - kr. - kr.
13 - kr. - kr.
14 - kr. - kr.
15 - kr. - kr.
Betting
Cell Formulas
RangeFormula
C3C3=SUM(E9:E305)
C4C4=SUM(G9:G305)
C5C5=C3*C6/F5
C6C6=C4/C3
F3F3=COUNTIF(H9:H305,"=W")
F4F4=COUNTIF(H9:H305,"=L")
F5F5=F3+F4
F6F6=SUM(D9:D67)/F5
F9:F15F9=D9*E9
G9:G15G9=IF(H9="W",F9-E9,IF(H9="L",-E9,IF(H9=3,0,0)))
Cells with Conditional Formatting
CellConditionCell FormatStop If True
C4,G9:G305Cell Value<0textNO
C4,G9:G305Cell Value>0textNO
H9:H305Cell Value="L"textNO
H9:H305Cell Value="W"textNO
 
Upvote 0
Like this?

BTW, I suggest that you investigate XL2BB for providing sample data to make it easier for helpers by not having to manually type out sample data to test with.

20 09 10.xlsm
EFGHIJKLM
3102.05Win20.50
4102.24Win22.40
5102.01Lose-10.00
6102.13Lose-10.00
7 
Win lose
Cell Formulas
RangeFormula
M3:M7M3=IF(L3="","",IF(L3="Win",E3*F3,-E3))
Thank so much, that's perfect and I take on board your suggestion :)

Paul
 
Upvote 0
Another option are this, which exist as a ready made Sheet on the internet. Og hvis du er Svensker, så er skemaet lavet på Dansk.
I'm not sure, if I'm allowed to insert a Link, but I take the risk: https://oddsekspert.dk/odds-regnskab-skabelon/

Odds-Skabelon1.xlsx
ABCDEFGHIJK
1
2ØkonomiStatistik
3Indskud kr 85,00 Vundet1
4Profit kr 89,25 Tabt0
5Gen. Profit kr 89,25 Antal 1
6ROI %105%Gns. Odds2,05
7
8DatoSamlet OddsIndskudGevinstProfitResultat
909-09-20202,05 85,00 kr. 174,25 kr. 89,25 kr. W
10 - kr. - kr.
11 - kr. - kr.
12 - kr. - kr.
13 - kr. - kr.
14 - kr. - kr.
15 - kr. - kr.
Betting
Cell Formulas
RangeFormula
C3C3=SUM(E9:E305)
C4C4=SUM(G9:G305)
C5C5=C3*C6/F5
C6C6=C4/C3
F3F3=COUNTIF(H9:H305,"=W")
F4F4=COUNTIF(H9:H305,"=L")
F5F5=F3+F4
F6F6=SUM(D9:D67)/F5
F9:F15F9=D9*E9
G9:G15G9=IF(H9="W",F9-E9,IF(H9="L",-E9,IF(H9=3,0,0)))
Cells with Conditional Formatting
CellConditionCell FormatStop If True
C4,G9:G305Cell Value<0textNO
C4,G9:G305Cell Value>0textNO
H9:H305Cell Value="L"textNO
H9:H305Cell Value="W"textNO
Thank you, it could certainly have been an option but for the reply from Peter :)
 
Upvote 0
Thank so much, that's perfect ...
You're welcome. Thanks for the follow-up. :)


BTW, that template has a very odd formula in column G :confused:
=IF(H9="W",F9-E9,IF(H9="L",-E9,IF(H9=3,0,0)))
a) Why would H9 be 3 (or 9 or "z",...)?
b) That final IF function will return 0 for any value of H9!
 
Upvote 0
You're welcome. Thanks for the follow-up. :)


BTW, that template has a very odd formula in column G :confused:
=IF(H9="W",F9-E9,IF(H9="L",-E9,IF(H9=3,0,0)))
a) Why would H9 be 3 (or 9 or "z",...)?
b) That final IF function will return 0 for any value of H9!
Yes, it looks strange, with the rest of the IF formula. The last section (you marked in Red) should be removed. The person who made the Template, must have had something else in mind, with the Formula!
 
Upvote 0
The last section (you marked in Red) should be removed.
.. or replaced with "" so that the formula returns nothing until W/L is entered in column H .. at which point it becomes basically identical to my suggested formula, just written in a different order. :)
 
Upvote 0

Forum statistics

Threads
1,214,929
Messages
6,122,317
Members
449,081
Latest member
tanurai

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top