Help with excel formula

Discussion regarding the spreadsheet functionality of Bet Angel.
Post Reply
Valda
Posts: 106
Joined: Mon Sep 17, 2018 8:11 pm

Can anyone help me please.
I have a timer and a column of changing values.
I want to capture and keep the values at a specific moment on the timer..

Thanks for any help.
spreadbetting
Posts: 3140
Joined: Sun Jan 31, 2010 8:06 pm

Easiest way is to copy the data where ever you want it once the time has been hit or passed and set a flag so the data routine doesn't get re-triggered.

So say our range we want to copy is X1:X10 and we want to dump it in Y1:Y10, our timer is in A1 and we want to fire at 00:01:00, assuming your timer is counting up wards what we'd do is copy the data as soon as the timer hit or exceeded our capture time, setting a definite time is always risky as you may skip it so best to have equal or greater than then you'd catch it as near as possible to your time.

Our flag to stop the routine from continually firing could be as simple as Y1 containing data, i.e. our routine has now fired and copied.

So with VBA we could add the following to any code you currently have running

Code: Select all


If  Range("Y1").Value ="" And  Range("A1").Value >= TimeValue("00:01:00") Then Range("Y1:Y10").Value = Range("X1:X10").Value

There are other methods using formulas by setting your maximum iterations and you'd probably want to flag the race data so you can clear on each market change but there wasn't much info to go on so that's simply a method to acheive what you're after.
Valda
Posts: 106
Joined: Mon Sep 17, 2018 8:11 pm

Ah - that looks great, thank you for your help.
Post Reply

Return to “Bet Angel - Spreadsheet / Excel chat”