Clearing the status field in Excel

Discussion regarding the spreadsheet functionality of Bet Angel.
Post Reply
amberleith
Posts: 35
Joined: Sat Apr 09, 2016 11:50 am

Hello.

I am aware that this has come up a million times and I have done everything I could to reverse engineer the code thats been posted.

I have a spreadsheet that has lots of different markets open at once, I want to clear the status field on any of them when a bet has failed to place.

I have used the code in the visual basic editer but it doesnt work, I've pasted it into This Workbook-

Private Sub Worksheet_Calculate()
If Range("O6,O9,O11,O13,O15,O17,O19,O21,O23,O25,O27,O29,O31,O33,O35,O37,O39,O41,O43,O45,O47,O49,O51,O53,O55,O57,O59,O61,O63").Value = "FAILED" Then Range("O6,O9,O11,O13,O15,O17,O19,O21,O23,O25,O27,O29,O31,O33,O35,O37,O39,O41,O43,O45,O47,O49,O51,O53,O55,O57,O59,O61,O63").ClearContents
End Sub



From what I can tell, isnt this supposed to run automatically, checking the status field on every open sheet and clearing it when the word FAILED is put in there?
nigelk
Posts: 469
Joined: Wed Apr 15, 2009 11:00 pm

An event will only work on the sheet it is in. So if you have several sheets, put the code and formula into each sheet.

On the attached in AG1 , you'll see a formula that specifically looks for the word "failed", if it finds one, all cells in column O (down to 100) will be cleared,

If you just need a specific cell to be cleared, the code will be slighly different.
You do not have the required permissions to view the files attached to this post.
amberleith
Posts: 35
Joined: Sat Apr 09, 2016 11:50 am

Well I'd rather just clear the cell that has the "FAILED" status.

Putting the code in every sheet has worked somewhat but I'm a bit affraid to use it!
nigelk
Posts: 469
Joined: Wed Apr 15, 2009 11:00 pm

Only clear the status cell/cells that contain failed.
You do not have the required permissions to view the files attached to this post.
amberleith
Posts: 35
Joined: Sat Apr 09, 2016 11:50 am

Thank you!
Post Reply

Return to “Bet Angel - Spreadsheet / Excel chat”