Hey guys
I am in the middle of building a model to help my sportsbetting, but I have a problem.
I have 2 colums with home team goals and away teams goals, each row representing a match: the first match finished 4-1, the second 4-0 ect., look like this:
Home Away
4 1
4 0
6 2
3 1
3 0
0 3
2 0
ect.
What i could like to calculate is betting option called both to score/not to score.
Both to score Not to score
Under the both to score, I would like excel to calculate in how many matches both scored, ie >= 1 for both teams.
For the not to score option, I would like excel to calculate in how many matches only 1 team scored.
I can't seem to find a solution for this.
Any help is appriciated.
Thanks in advance.
Last edited by Melgaard; 03-19-2010 at 08:30 AM.
Given use of XL2007
Both to Score
=COUNTIFS(A:A;">0";B:B;">0")
Not to Score
=SUM(COUNTIFS(A:A;{">0"\"0"};B:B;{0\">0"}))
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
what about 0-0?
Mojito connoisseur and a dabbler in Cisco
where does code go ?
look here
how to insert code
how to enter array formula
why use -- in sumproduct
recommended reading
wiki Mojito
how to say no convincingly
most important thing you need
Martin Wilson: SPV
and RSMBC
Thanks a lot sir. Didn't think it would that easy
Thanks again, really appriciate it![]()
Ah. Yes 0-0 doesn't seem to be recognised. It should be counted under "not to score". Anyone?
If you need to include 0-0 also then you could add the third combination to the inline arrays - ie n-0, 0-n, 0-0
=SUM(COUNTIFS(A:A;{">0"\0\0};B:B;{0\">0"\0}))
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
Works now. Thanks a lot sir![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks