Hi all,
I've built myself a nice little in-play trading interface that I'm actually pretty happy with. I've done it all through excel and i'm now happy that it's giving me accurate signals. Up until now I have been using an IF condition to trigger a bet however it's pretty basic stuff as I can only put one line of formula in the command box. Is it possible to put multiple commands in?
Excel help
- jamesedwards
- Posts: 3916
- Joined: Wed Nov 21, 2018 6:16 pm
I am a very entry-level BA > Excel user. I use IFS statements for my triggers so I can populate a command cell with different value depending on the values of other cells.
eg:
=IFERROR(IFS(Sheet2!A1=1,"BACK",Sheet2!A1=2,"LAY"),"")
eg:
=IFERROR(IFS(Sheet2!A1=1,"BACK",Sheet2!A1=2,"LAY"),"")
- wearthefoxhat
- Posts: 3550
- Joined: Sun Feb 18, 2018 9:55 am
MrJoeBlack wrote: ↑Wed Feb 19, 2025 11:45 amHi all,
I've built myself a nice little in-play trading interface that I'm actually pretty happy with. I've done it all through excel and i'm now happy that it's giving me accurate signals. Up until now I have been using an IF condition to trigger a bet however it's pretty basic stuff as I can only put one line of formula in the command box. Is it possible to put multiple commands in?
I'm no excel guru, but with GPT's help I've found, (as long as you outline what you want), it can produce pretty much anything. If there are various moving parts on your sheet, it might suggest using a helper column to pick up a number into another formula.
DeepSeek can also offer an alternative view and can sometimes make the formula better. It's useful to cross refer with both A.I. models as the outputs can be wrong sometimes, (usually due to my dumb instructions)
Here's an example of one that it produced for me showing combinations of formula.
You do not have the required permissions to view the files attached to this post.
I've been using Excel since the sometime in the last century and I didn't know about the "IFS" formula. I have always used nested IF statements.jamesedwards wrote: ↑Wed Feb 19, 2025 12:27 pmI am a very entry-level BA > Excel user. I use IFS statements for my triggers so I can populate a command cell with different value depending on the values of other cells.
eg:
=IFERROR(IFS(Sheet2!A1=1,"BACK",Sheet2!A1=2,"LAY"),"")
You have just changed my life!!
So are you using the code to sort data once its exported from BA, or are you using code to get it straight to Excel from BA?wearthefoxhat wrote: ↑Wed Feb 19, 2025 12:45 pmMrJoeBlack wrote: ↑Wed Feb 19, 2025 11:45 amHi all,
I've built myself a nice little in-play trading interface that I'm actually pretty happy with. I've done it all through excel and i'm now happy that it's giving me accurate signals. Up until now I have been using an IF condition to trigger a bet however it's pretty basic stuff as I can only put one line of formula in the command box. Is it possible to put multiple commands in?
I'm no excel guru, but with GPT's help I've found, (as long as you outline what you want), it can produce pretty much anything. If there are various moving parts on your sheet, it might suggest using a helper column to pick up a number into another formula.
DeepSeek can also offer an alternative view and can sometimes make the formula better. It's useful to cross refer with both A.I. models as the outputs can be wrong sometimes, (usually due to my dumb instructions)
Here's an example of one that it produced for me showing combinations of formula.
Excel combo.png
- jamesedwards
- Posts: 3916
- Joined: Wed Nov 21, 2018 6:16 pm
Win wrote: ↑Wed Feb 19, 2025 6:01 pmI've been using Excel since the sometime in the last century and I didn't know about the "IFS" formula. I have always used nested IF statements.jamesedwards wrote: ↑Wed Feb 19, 2025 12:27 pmI am a very entry-level BA > Excel user. I use IFS statements for my triggers so I can populate a command cell with different value depending on the values of other cells.
eg:
=IFERROR(IFS(Sheet2!A1=1,"BACK",Sheet2!A1=2,"LAY"),"")
You have just changed my life!!

- wearthefoxhat
- Posts: 3550
- Joined: Sun Feb 18, 2018 9:55 am
No, that code is in one cell, reading and calculating data that's been copy/pasted into another part of the excel sheet.Fugazi wrote: ↑Wed Feb 19, 2025 6:06 pmSo are you using the code to sort data once its exported from BA, or are you using code to get it straight to Excel from BA?wearthefoxhat wrote: ↑Wed Feb 19, 2025 12:45 pmMrJoeBlack wrote: ↑Wed Feb 19, 2025 11:45 amHi all,
I've built myself a nice little in-play trading interface that I'm actually pretty happy with. I've done it all through excel and i'm now happy that it's giving me accurate signals. Up until now I have been using an IF condition to trigger a bet however it's pretty basic stuff as I can only put one line of formula in the command box. Is it possible to put multiple commands in?
I'm no excel guru, but with GPT's help I've found, (as long as you outline what you want), it can produce pretty much anything. If there are various moving parts on your sheet, it might suggest using a helper column to pick up a number into another formula.
DeepSeek can also offer an alternative view and can sometimes make the formula better. It's useful to cross refer with both A.I. models as the outputs can be wrong sometimes, (usually due to my dumb instructions)
Here's an example of one that it produced for me showing combinations of formula.
Excel combo.png
Just demonstrating to the OP that other conditions can be lumped together with the IF function.
Ah I see. Only recently come to the realisation the only way I will ever scale is to start data collecting rather than trying a new iteration of a bot every weekwearthefoxhat wrote: ↑Wed Feb 19, 2025 7:37 pmNo, that code is in one cell, reading and calculating data that's been copy/pasted into another part of the excel sheet.Fugazi wrote: ↑Wed Feb 19, 2025 6:06 pmSo are you using the code to sort data once its exported from BA, or are you using code to get it straight to Excel from BA?wearthefoxhat wrote: ↑Wed Feb 19, 2025 12:45 pm
I'm no excel guru, but with GPT's help I've found, (as long as you outline what you want), it can produce pretty much anything. If there are various moving parts on your sheet, it might suggest using a helper column to pick up a number into another formula.
DeepSeek can also offer an alternative view and can sometimes make the formula better. It's useful to cross refer with both A.I. models as the outputs can be wrong sometimes, (usually due to my dumb instructions)
Here's an example of one that it produced for me showing combinations of formula.
Excel combo.png
Just demonstrating to the OP that other conditions can be lumped together with the IF function.
- ShaunWhite
- Posts: 10353
- Joined: Sat Sep 03, 2016 3:42 am
For clarity and ease of maintenance it's sometimes better to have a cell for each condition that results in a 1 or 0. Let's say 6 conditions, and another formula cell that acts when the sum of those cells is 6.
When you have multiple nested ifs, and each might have several ands and ors it can be easy to make mistakes and hard to find them in one statement. A list of 1s and 0s makes debugging easy, and it's also easy to play around with things like if 5/6 then bet small, but 6/6 bet bigger. Aka a signal strength indicator.
It's not unlike how an automation algorithm sometimes operates, parameters are fed into a function that returns a number between - 1 and +1. - 1 is a full strength lay and +1 is a full strength back and a scale in between or have a threshold such as < or > 0.95. Basically it creates an analog signal rather than a binary one.
When you have multiple nested ifs, and each might have several ands and ors it can be easy to make mistakes and hard to find them in one statement. A list of 1s and 0s makes debugging easy, and it's also easy to play around with things like if 5/6 then bet small, but 6/6 bet bigger. Aka a signal strength indicator.
It's not unlike how an automation algorithm sometimes operates, parameters are fed into a function that returns a number between - 1 and +1. - 1 is a full strength lay and +1 is a full strength back and a scale in between or have a threshold such as < or > 0.95. Basically it creates an analog signal rather than a binary one.
- ShaunWhite
- Posts: 10353
- Joined: Sat Sep 03, 2016 3:42 am
I see it still hasn't learned to wrap an IfError around things.wearthefoxhat wrote: ↑Wed Feb 19, 2025 12:45 pmHere's an example of one that it produced for me showing combinations of formula.
Excel combo.png


Sounds picky but as soon as cells can return #value or similar then another cell has to cater for it. Eg it might cause a SUM function to fail. It's the classic defensive coding methodology that validates inputs rather than later code having to deal with potentially invalid data.
Old habits die hard

- wearthefoxhat
- Posts: 3550
- Joined: Sun Feb 18, 2018 9:55 am
ShaunWhite wrote: ↑Wed Feb 19, 2025 11:48 pmI see it still hasn't learned to wrap an IfError around things.wearthefoxhat wrote: ↑Wed Feb 19, 2025 12:45 pmHere's an example of one that it produced for me showing combinations of formula.
Excel combo.pngIt's sort of bedroom code rather than bulletproof professional my-money-is-at-risk-here code. It works but it's a QA dept fail
![]()
Sounds picky but as soon as cells can return #value or similar then another cell has to cater for it. Eg it might cause a SUM function to fail. It's the classic defensive coding methodology that validates inputs rather than later code having to deal with potentially invalid data.
Old habits die hard![]()
I must remember to be more specific with the model, re-IFError function!
I just spent 2 days trying to get ChatGPT to write me some python code with a few IF statements and it just went round and round. I eventually used it it help me flesh out the step-by-step logic in excel like Shaun suggests and it was a masterpiece in 20 minutes.
- ShaunWhite
- Posts: 10353
- Joined: Sat Sep 03, 2016 3:42 am
In your user setting you can specify things you always want considered. Like UK prices, metric measurements, error tollerent code, double check output, medium length replies etc etcwearthefoxhat wrote: ↑Thu Feb 20, 2025 7:48 amI must remember to be more specific with the model, re-IFError function!
I've found that without the 'double check' it makes assumptions rather than being thorough. Although I did point out that by 'double check' you actually just mean 'check'
- ShaunWhite
- Posts: 10353
- Joined: Sat Sep 03, 2016 3:42 am
You'll be glad of it in 3 months time when you can't remember how your ifs worked.Anbell wrote: ↑Thu Feb 20, 2025 9:25 amI just spent 2 days trying to get ChatGPT to write me some python code with a few IF statements and it just went round and round. I eventually used it it help me flesh out the step-by-step logic in excel like Shaun suggests and it was a masterpiece in 20 minutes.
For code I ask it to write the detailed comment blocks too. I recognise that spiral though, once it gets on the wrong track it's hard to get it back without saying 'bin all that and let's start again '
Yes, you can use multiple commands in an Excel formula by combining functions like IF, AND, OR, or even nesting multiple IF statements. However, for more complex logic, you might want to use VBA (Visual Basic for Applications). VBA would allow you to create more advanced conditions and execute multiple actions when a condition is met. If you're open to using VBA, you can write a script that checks your conditions and places bets accordingly. Let me know if you need help getting started with that!MrJoeBlack wrote: ↑Wed Feb 19, 2025 11:45 amHi all,
I've built myself a nice little in-play trading interface that I'm actually pretty happy with. I've done it all through excel and i'm now happy that it's giving me accurate signals. Up until now I have been using an IF condition to trigger a bet however it's pretty basic stuff as I can only put one line of formula in the command box. Is it possible to put multiple commands in?