Horse Racing Forum - PaceAdvantage.Com - Horse Racing Message Board

Go Back   Horse Racing Forum - PaceAdvantage.Com - Horse Racing Message Board > Thoroughbred Horse Racing Discussion > Handicapping Software


Reply
 
Thread Tools Rate Thread
Old 01-27-2010, 05:36 PM   #1
punteray
Registered User
 
punteray's Avatar
 
Join Date: Feb 2006
Location: Bishop, CA
Posts: 249
preserve number in cell of excel

For my program I need the odds at different MTP. I am displaying LIVE ODDS.

I have a formula in a cell that says"when MTP=xx then cell yy equal the displayed odds. When MTP changes that number goes away. I need to preserve that number but in my research I have not been able to come up with a viable method.

Any suggestions??

Ray
punteray is offline   Reply With Quote Reply
Old 01-27-2010, 05:56 PM   #2
HUSKER55
Registered User
 
HUSKER55's Avatar
 
Join Date: Jul 2007
Location: MILWAUKEE
Posts: 5,285
just a thought, it appears the cells is linked to the active cell which changes when the MTP changes

maybe, set another cell to that value

if(mtp=2,z4=yy4,0) or something along that line. that way the only time that cell would contain a value is when the mtp was 2 and there is nothing to change the value.

maybe.

good luck
__________________
Never tell your problems to anyone because 20% flat don't care and 80% are glad they are yours.

No Balls.......No baby!

Have you ever noticed that those who do not have a pot to piss in nor a window to throw it out of always seem to know how to handle the money of those who do.
HUSKER55 is offline   Reply With Quote Reply
Old 01-27-2010, 08:34 PM   #3
traveler
Registered User
 
Join Date: Feb 2003
Location: NY
Posts: 245
Have you looked at the "Choose" formula.
traveler is offline   Reply With Quote Reply
Old 01-27-2010, 09:56 PM   #4
hcap
Registered User
 
hcap's Avatar
 
Join Date: Nov 2002
Posts: 30,398
You probably want to set up some code that is event driven that copies the value of that cell to another location so you have a permanent record. Not worked out completely, but try this. It should give you a notion of event driven code. In this case when a range changes.

Right click on the worksheet tab where you are working. View code
A vba window should open. Insert this code.
"vrange" should be the cell that changes

Quote:
Private Sub worksheet_change(ByVal target As Excel.Range)
Dim vrange As Range
Set vrange = Range("c8")
If Union(target, vrange).Address = vrange.Address Then
Call COPTOVALUES
End If
COPTOVALUES should be the code that copies the values to another cell.
That does not have to be added to the sheet code. That can be an ordinary module

Also go here.

http://www.java2s.com/Code/VBA-Excel...hangeevent.htm
hcap is offline   Reply With Quote Reply
Old 01-27-2010, 10:07 PM   #5
raybo
EXCEL with SUPERFECTAS
 
raybo's Avatar
 
Join Date: Mar 2004
Posts: 10,206
I think Husker's got the right idea.

When you enter an "IF" statement into a cell, you have to state a value for both the "true" scenario and the "false" scenario. Therefore, once the scenario becomes true and then it becomes false the value in the cell must change to the "false" value. The only way around that, off the top of my head, would be to link the target cell to another cell, like Husker suggested, then when the target cell becomes false, the linked cell will still have the true value in it. So, if you're tracking MTP several times you would need several linked cells to preserve all the different MTPs you're tracking.

Or

How about this?

=IF(MTP>2,"",displayed odds)

Meaning if MTP has not reached 2 minutes yet, then the cell is blank, once it reaches 2 MTP then the cell becomes the displayed odds and never changes again until MTP is once again greater than 2 (when the next race tote starts)
__________________
Ray
Horseracing's like the stock market except you don't have to wait as long to go broke.

Excel Spreadsheet Handicapping Forum

Charter Member: Horseplayers Association of North America
raybo is offline   Reply With Quote Reply
Old 01-28-2010, 06:32 AM   #6
hcap
Registered User
 
hcap's Avatar
 
Join Date: Nov 2002
Posts: 30,398
More on events..

http://www.mvps.org/dmcritchie/excel/event.htm

Look at the Timestamp stuff
hcap is offline   Reply With Quote Reply
Old 01-28-2010, 11:35 AM   #7
punteray
Registered User
 
punteray's Avatar
 
Join Date: Feb 2006
Location: Bishop, CA
Posts: 249
THANK YOU

I will investigate the code given and look at the websites given for additional info!!!

Thank you all

Ray Scalise
punteray is offline   Reply With Quote Reply
Reply




Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

» Advertisement
» Current Polls
Wh deserves to be the favorite? (last 4 figures)
Powered by vBadvanced CMPS v3.2.3

All times are GMT -4. The time now is 03:29 AM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 1999 - 2023 -- PaceAdvantage.Com -- All Rights Reserved
We are a participant in the Amazon Services LLC Associates Program, an affiliate advertising program
designed to provide a means for us to earn fees by linking to Amazon.com and affiliated sites.