Forums
There is currently 1 person viewing this thread.
Stevie Strikes
18 Feb 17 12:01
Joined:
Date Joined: 27 Apr 04
| Topic/replies: 1,279 | Blogger: Stevie Strikes's blog
Function bfBakWin(Pos, bfSP, Optional IDref As String)
    bfBakWin = -1
    If bfSP = 0 Then bfBakWin = 0: Exit Function
    If Pos = 1 Then
        bfBakWin = XUstk(Round(((bfSP - 1) * RedFact(IDref)) * CommNet, 2))
    End If
End Function

For me.

Post your reply

Text Format: Table: Smilies:
Forum does not support HTML
Insert Photo
Cancel
sort by:
Show
per page
Replies: 13
By:
Dotchinite
When: 18 Feb 17 12:02
Was just about to post that.
By:
mememe
When: 18 Feb 17 12:09
I lay horses.

My fav is    if(cell="w",((cell-1)*-100),100).

Simple but effective, providing the fookin horse gets beaten.
By:
Ovalman.
When: 18 Feb 17 12:57
That if statement does nothing?^^
By:
mememe
When: 18 Feb 17 14:29
Ovalman,

it works for me, but I'm not gonna tell you which ones to layLaugh
By:
Ovalman.
When: 18 Feb 17 14:54
I don't know excel but if statements should have conditions

    If bfSP = 0 Then bfBakWin = 0: Exit Function
    If Pos = 1 Then


Yours has no conditions Excited
By:
Just Checking
When: 18 Feb 17 18:01
The = is to test equals, as it's basic.
The : AFAIK joins up everything to the right of his Then, so both are done. In english: "set as zero and then exit".

Condition THAT! *drops mic and walks off* Laugh
By:
Ovalman.
When: 18 Feb 17 18:05
No experience of Excel

What does if(cell="w",((cell-1)*-100),100) mean.
By:
Stevie Strikes
When: 18 Feb 17 21:17
Should have been:

Function bfBakWin(Pos, bfSP, Optional IDref As String)
    bfBakWin = XUstk(-1)
    If bfSP = 0 Then bfBakWin = 0: Exit Function
    If Pos = 1 Then
        bfBakWin = XUstk(Round(((bfSP - 1) * RedFact(IDref)) * CommNet, 2))
    End If
End Function


Where Pos = finishing position and bfSP = BF starting price
Idref is the unique race ID reference
RedFact checks Idref against a table of races subject to r4 deductions and dead heats
and returns a reduction factor (1 if their are none)
CommNet returns the result net of commission.
Ustk = returns the above calculation * your unit stake

I shall now repair to General Betting for a similarly lukewarm response.
By:
mememe
When: 19 Feb 17 11:28
Ovalman.
18 Feb 17 19:05
Joined: 29 Nov 02
| Topic/replies: 14,009 | Blogger: Ovalman.'s blog
No experience of Excel

What does if(cell="w",((cell-1)*-100),100) mean.


I keep a spreadsheet to capture my history.  Each row shows whether the selection won (w) or lost (blank).  The logic in the formula looks at the cell containing w or blank, and then takes the price I got for my lay bet, and calculates whether I won money or lost money and how much.

Of course I could just look at my Betfair P&L, but being a former accountant, I like to have some checks and balances.  Betfair have been known to make the occasional error.
By:
Ovalman.
When: 19 Feb 17 14:57
I'm developing a few Android apps atm so these things interest me. I always meant to learn excel but it's on the back burner as I get to grips with Java.

If you learn one language, all the rest seem to fall into place imo.
By:
mememe
When: 19 Feb 17 15:29
Ovalman, GL with that.

Many, many years ago I bought a home computer and was learning to write in BASIC.

I wrote a dice game programme with automatic scoring for each player for the kids.  I wrote little modules and kept testing them.

I then put them all together and the fookin machine got over excited and scrambled everything!!

It had only got 16k of RAM and I think I made its head hurt.

Never again. LaughLaugh
By:
Clouseau
When: 19 Feb 17 16:39
I've got a question time function:
if x=1, blame Brexit, Trump, Racism, Hitler, Fascism, Islamophobia and Bankers = round of applause.
End function
By:
Ovalman.
When: 19 Feb 17 16:40
That's how I got started, bought myself a ZX81 and there was nothing else to do on it but learn to program. Upgraded to a ZX Spectrum but then my willy got bigger and women were more appealing than computers Excited

Tried several times in the past to get back into it but everything seemed so alien. Object Orientated Programming talked about building feckin houses FFS and you had to use Notepad++ and a compiler to run things. Not a wonder I struggled.

I stuck with it tho, kept trying and then done a free course on Udacity where everything seems to have clicked. I'm working on a business idea atm which I think would sell, there's nothing on the app store that has been addressed so I think it has a unique selling point. The great thing is the line of business is not a niche so I'd have many potential customers. I've a basic working app atm but not ready for the app store.

I've other ideas but I don't think your ever too old to learn. I'm 48 and still try, that's why I questioned the if statement Wink
sort by:
Show
per page

Post your reply

Text Format: Table: Smilies:
Forum does not support HTML
Insert Photo
Cancel
‹ back to topics
www.betfair.com