VBA To Compare Racing Times
Dec 30, 2008
I have a spreadsheet of about many rows and 5 cols shown in the attached. I show 3 races..each will have a different time to the previous race. I want to use the rsq function to compare the data for that race in col c with that in col d and produce the answer for the 1st race in each row in col e for that race..then proceed to do the same for race 2,then race 3 etc...
I need a formula in e2 I can drag down...each cell in col e should be filled with the answer for that race..I have thousands of races..
View 4 Replies
ADVERTISEMENT
Dec 27, 2006
I have tried lots of alternative for making Excel Dates & Times calculation work in vba. I can't find the place its creating problem. I have attached spreadsheet to have better look at it. When I am using time in one column (Calender!C) in VBA code, it works fine and update values in R1,R2... columns. But, when I am using time in another column (Calender!D), its not working properly and not updating appropriate columns. I will appreciate if someone can look at vba code in attached file. It looks like I am missing some kind of setting in excel/vba.
View 3 Replies
View Related
Jan 7, 2008
I am trying to get rid of some duff data by running a comparison to a fixed value on a defined range. However, the macro tries to compare the cell value (00:05:00) as a decimal value.
I think I need to use the format function to get round this.
For Each timecheckcell In range("g3:g60")
timecheckcell.Value = Format(MyTime, "h:m:s")
If timecheckcell.Value <> "00:05:00" Then timecheckcell.Offset(0, 1) = ""
Next
View 9 Replies
View Related
Apr 13, 2008
I have a routine that loops through a block of records containing two time fields. One is the same for every record (let's call it the start time) the other, which varies, is the last time at which an event happened before or after the Start time (let's call it the Event time). so a pseudo block of data may look like this;
A B
15:00:00 15:01:27
15:00:00 15:00:05
15:00:00 14:59:27
15:00:00 14:59:01
15:00:00 14:48:45
I need to identify the record that has the closest time in column B to that in column A (in the example above that would be B2 (15:00:05). I then save that record off and eliminate the rest for that time block. The whole subroutine then repeats for the next block of data and so on down the list, top to bottom ( times are in descending order). Note also that times will never span the 24-hour point - they all occur betrween 12:00 and 22:00 on any given day.......
View 2 Replies
View Related
Nov 7, 2007
First off, can someone guide me to a better formula to E2:E14 or E21 if used later without the array? Other folks will use this workbook. Next, is there a way to do that without using columns F2 or G2. There are numbers below 0 to take into account that need ranked. The whole idea is to rank them as to whatever #'s are closest to 4.7000. I eventually want it to match the name in column- A2 to the appropriate ranking. 0.0000 is #1 and the highest abs would be #13-(1.0098) in the sheet. If anything in A2:A21 is added or removed I'd like the entire row to remain "blank".
************************************************************************>Microsoft Excel - newstart.xls___Running: xl97 : OS = Windows ME (F)ile (E)dit (V)iew (I)nsert (O)ptions (T)ools (D)ata (W)indow (H)elp (A)boutD2E2F2G2H2D3E3F3G3H3D4E4F4G4H4D5E5F5G5H5D6E6F6G6H6D7E7F7G7H7D8E8F8G8H8D9E9F9G9H9D10E10F10G10H10D11E11F11G11H11D12E12F12G12H12D13E13F13G13H13D14E14F14G14H14=
ABCDEFGHI1Name / Car #1st Pass2nd PassBest Run4.70000 Name2Bartlett 5254.65694.55594.6569-0.04310.00000.00001Moody3R. Stringer 41334.72264.58994.5899-0.11010.00010.00012S. Stringer4Norman 4894.73474.68924.6892-0.0108-0.00030.00033Powell5M. Jones 46594.73534.69934.6993-0.00070.00040.00044A. Mears6Powell 4134.73944.69974.6997-0.00030.00050.00055K. Rierson7Penner 42914.78304.99034.78300.0830-0.00070.00076M. Jones8Moody 49074.81024.70004.70000.0000-0.01080.01087Norman9A. Mears F4094.92884.70044.70040.00040.01180.01188D. David10K. Rierson 450R5.57334.70054.70050.0005-0.04310.04319Bartlett11Muse 47995.84025.70215.70211.00210.08300.083010Penner12LH Newlin 44425.84525.70985.70981.0098-0.11010.110111R. Stringer13D. David 48386.42984.71184.71180.01181.00211.002112M. Muse14S. Stringer 4229.20154.70014.70010.00011.00981.009813LH Newlin15 Sheet1
[HtmlMaker 2.42] To see the formula in the cells just click on the cells hyperlink or click the Name box
View 12 Replies
View Related
Aug 3, 2007
I've made my own spreadsheet to record my racing bets. Everything works great, however I want to expand it to become more complex.
There are 2 formulas I'm having trouble creating:
1...the formula for dead-heat finishes including the Rule 4 deductions (2,3 & 4 way dead-hets)
2...the formula for each-way bets including the Rule 4 deductions (the win part & the placed part)
I guess only people with knowledge of horse racing / betting will be able to help me on this.
View 9 Replies
View Related
May 6, 2009
i need to do the following on the attached spreadsheet using a macro: SHEET 1. This is an example of the original data i will be working with i need
1) You will notice that the Min and Max columns are not all together, i need these to all be together. I then only want the Race course, race time, date and type, Min, Max and ratings.
2) I then want the following formula added to Column F, Max minus Min. In column G i would like the following formula Rating minus Min. And finally in Column H Rating minus Max.
3) I would the like to Highlight in Yellow the horse with the highest possible number. I want this done for each column (F,G,H) in each race i would like all Horses that dont have a yellow cell in any of the Columns (F,G,H) to be deleted, leaving me with just the highlighted horses. An example of the required final result is contained in Sheet 2 of the attached spreadsheet.
View 2 Replies
View Related
Oct 7, 2006
I have odds line numbers on this excel sheet which is the VL column. I'd like to be able to scratch a horse, (delete a horse from the sheet) and the odds line (VL column) will update to the new value after the horses is scratched from this sheet.
Now I do this in a program that uses VBA and transports this info to Access, where then I export to Excel to this sheet.
Here's the formula I use for the odds line...
#EQUAL(#COLVAL(51),1, .00001)*((#COLVAL(53))-(#COLVAL(53)*.4))/(#COLVAL(50))+
#EQUAL(#COLVAL(51),2, .00001)*((#COLVAL(53))-(#COLVAL(53)*.25))/(#COLVAL(50))+
#EQUAL(#COLVAL(51),3, .00001)*((#COLVAL(53))-(#COLVAL(53)*.10))/(#COLVAL(50))+
#EQUAL(#COLVAL(51),4, .00001)*((#COLVAL(53))+(#COLVAL(53)*.05))/(#COLVAL(50))+
#EQUAL(#COLVAL(51),5, .00001)*((#COLVAL(53))+(#COLVAL(53)*.10))/(#COLVAL(50))+
#EQUAL(#COLVAL(51),6, .00001)*((#COLVAL(53))+(#COLVAL(53)*.25))/(#COLVAL(50))+
#EQUAL(#COLVAL(51),7, .00001)*((#COLVAL(53))+(#COLVAL(53)*.40))/(#COLVAL(50))+
#EQUAL(#COLVAL(51),8, .00001)*((#COLVAL(53))+(#COLVAL(53)))/(#COLVAL(50))+
#EQUAL(#COLVAL(51),9, .00001)*((#COLVAL(53))+(#COLVAL(53)*1.3))/(#COLVAL(50))+
#EQUAL(#COLVAL(51),10, .00001)*((#COLVAL(53))+(#COLVAL(53)*1.6))/(#COLVAL(50))+
#EQUAL(#COLVAL(51),11, .00001)*((#COLVAL(53))+(#COLVAL(53)*1.9))/(#COLVAL(50))+
#EQUAL(#COLVAL(51),12, .00001)*((#COLVAL(53))+(#COLVAL(53)*2.2))/(#COLVAL(50))+
#EQUAL(#COLVAL(51),13, .00001)*((#COLVAL(53))+(#COLVAL(53)*2.7))/(#COLVAL(50))
I added a couple of columns in the excel sheet to occomadate this formula which should work if coded into excel properly. Notice the (50), (51), (53) numbers.
(50) = TC in this excel sheet
(51) = 2V in this excel sheet
(53) = TCa in this excel sheet
VL column is where this formula updates to.
I have one other minor problem with something else, but so not to confuse, I'll mention it later.
View 9 Replies
View Related
Sep 28, 2009
I have a line graph which I use in conjunction with live horseracing odds. On the vertical axis are the odds which are sourced from a worksheet. Each horse is represented by a data series that moves along the horizontal axis. The refresh rate is determined by the user embedded in the code.
I would like to expand the length of each data change along the horizontal axis as the data can be volatile. Sometimes there are rapid changes on the vertical axis which makes it difficult to interpret. With each refresh the line data moves about 3mm. It would be much better if it were about 5mm, especially as I now use a widescreen display.
There are no values on the horizontal axis as such, only time is suppose set by Excel?
View 9 Replies
View Related
Jun 21, 2006
Horses have 5 running styles; early speed to late closers; denoted as 1 to 5 in column Z. I'd like to count those noted as 1 thru 3 for each race.
In column FC (the last column with data) I have a race ID # for each race on the spreadsheet, somewhere between 2500 to 5000 races in each one. They're a monthly record. The race ID # is a concatenation of columns B (Track ID), C ( Date) & D (race #). Each is unique to its race. E.G. Aqueduct, jan 1st, 2004, 2nd race is id'd as AQU379872.
Would it be possible to create a macro that would (A) count the number of horse 1s, horse 2s & horse 3s from a specific race ID & then post those numbers in columns FD thru FF & (B) then continue to the next race ID in column FC & count those horses from that race & so on thru the entire spreadsheet?
Would it be simpler if each race ID were changed to a number--race 1 down to race 2500?
View 9 Replies
View Related
Oct 13, 2008
I'm trying to compare values in 2 separate columns to see how many times the same value appears in both columns. Ideally I would be able to insert a range function to compare the values in the column "ID 1" against the values in column "ID 2" and return the count of times that a value appears in both columns. For example 2122, 1112 and 1718 appear in both columns and I would like the formula to return a count of 3.
ID 1ID 2
12342122
45671112
89101718
11122678
13144544
15162324
17189987
19201215
21221928
1976
2576
2345
4678
In my actual project I'm comparing 2 columns in the same worksheet. The column are column B with data in cells B2:B10266 against column C with data in cells C2:C18560.
View 4 Replies
View Related
Feb 23, 2010
In my workbook I have about 20 sheets (less in the attached sample), and on most sheets I’d like to query data for each day and find an average value based on the time and then copy that result into another sheet. I’m not sure if I’ll need 2 macro’s for this or if one can be used.
Here’s a quick description:
Assuming that I am currently in the sheet I want to run the macro, then I will either input “1:45” or “0:45” into a popup box, or I could always simply input the 1:45 or 0:45 in the code itself. I’m flexible
1:45:
If I input 1:45, then I’d like the macro to find the first 1:45 in Column B and the value in the same row in Column F will be used in the calculation. Once 1:45 is located, then the macro moves up to find 22:45 in Column B and the value in the same row in Column F will be used in the calculation.....
View 11 Replies
View Related
Apr 8, 2014
I'm looking for a formula that will calculate the difference in times between specific times while working with a 24 hr clock. Please see details below:
E3 provides the start time of 4:00
H3 provides an end time of 15:30
If an employee works betwen the hours of 0:00 (midnight) to 5:59, this is considered DIFF hours and is therefore the number I am seaking. So for the data noted above, the total DIFF hours worked is 2 hours.
View 7 Replies
View Related
Mar 7, 2009
I need a formula in excel to convert start times and end times and minus out lunch time taken and then give total hours worked. For instance,
Column D Column E Column F Column G
Start End Lunch Total Hours Worked
10:01AM 7:08PM 1:01 (formula to convert hours worked)
View 9 Replies
View Related
Feb 21, 2014
Basically I have two sets of data. One will be new each week. I'd like to use the non-changing data as a base to compare new data to. The formula would need to match multiple values, including a 'time between', and then return whether a minimum rate has been met.
SampleRateExamine.xlsx‎
View 3 Replies
View Related
Mar 10, 2009
I have two ranges of numbers stored as text on two different sheets.
The first one is from product code and the second is from product category.
The problem is both ranges are of different lengths and I have to find out if a product from the right is part of a particular product category. Even if the length is different the first digits are indicative of the belonging of a code. For example 1234 and 12345 are “family”-their first 4 digits match.
Just to give you an example of what is desired:
Category____ Code
2200 ________22002
2323________ 232347
So, the loop should do the following:Compare the first string from the “Category” column to each and every entry on the right, if a match exists (we have no match here for 2200) write “ok” next to it.
Next trim one digit from the right from every string in the “Code” column.
Compare same first string from the “Category” column to each trimmed string from “Code” column (here we should have a match 2200=2200)
Write “ok” next to it
Now the loop goes to the second string from “Category” column and for this one we will have to trim 2 digits from the right of each string in “Code” column to achieve the result (2323=2323) and so on.
View 9 Replies
View Related
Sep 15, 2006
I thought I found a formula that would work, but it's not working. Each month I have to count the number of service tickets that have arrived between certain time ranges. They want to gauge during what times we seem to get the biggest batch of service requests.
6 am to 10 am
10 am to 5 pm
5 pm to 6 pm
6 pm to 6 am
The format of the cells are:
1:21:19 AM
1:28:08 AM
1:35:48 AM
1:49:19 AM
2:17:02 AM
7:14:38 AM
7:29:12 AM
8:08:28 AM
8:51:48 AM
8:54:19 AM
The formula I tried for 10 am to 5 pm: =COUNTIF(B2:B677,">="&TIME(10,0,0))-COUNTIF(B2:B677,">"&TIME(17,0,0))
It gives a result of 676, and I know from manually counting that there is only 327 cells that have a time between 10 am and 5 pm.
View 3 Replies
View Related
Jul 12, 2007
I included a spreadsheet that lays out what I am looking to do, basically I copied some times and speed from net. It shows up in non 24 hour format. I need to find the times and an associated speed for each row (day) directly before and after my inputted desired time. I've searched for days, tried different formulas with index,match, lookups,timevalue, time, etc and even tried using other peoples vba code without success.
View 9 Replies
View Related
Sep 28, 2007
i need to calculate between time. If a person is working between 8 till 12 and then 1 till 5 i need to count the instances between these times.. so if somebody is working between these hours a 1 should appear and if they have finished their shift or are on lunch then this should change to 0
e.g.
8.00 | 8.30 etc.. 12.30 | 13:00
1 | 1 | 0 | 1
View 9 Replies
View Related
Jan 18, 2007
I need to compare the date from the user input and the date listed on excel. How can I compare it? Is it correct? lngCmp = Val( Cells(I, 31))
Dim lngBegin As Long, lngEnd As Long, lngCmp As Date, lngResults As Long
lngBegin = 9 'beggining of data
lngEnd = 232 'end of data
lngCmp = InputBox("Please enter the date", "Begining of the week")
Lngcmp1 = DateAdd("d", 1, lngCmp)
lngCmp2 = DateAdd("d", 2, lngCmp)
lngCmp3 = DateAdd("d", 3, lngCmp)
lngCmp4 = DateAdd("d", 4, lngCmp)
lngCmp5 = DateAdd("d", 5, lngCmp)
'lngCmp1 = lngCmp + 1
'lngCmp2 = lngCmp + 2
'lngCmp3 = lngCmp + 3
'lngCmp4 = lngCmp + 4
'lngCmp5 = lngCmp + 5
lngResults = 0
lngResults1 = 0
lngResults2 = 0..................................
View 2 Replies
View Related
Jul 10, 2009
Have a spreadsheet i need to add together a large array of durations which are recorded in hours minutes and seconds. They are all formated like 0:00:00 and will likely run over a 24 hour period. Adding two of these together is fine but when i try and add multiple using =(A1:A5) the result returned is always 0:00:00. I have tried formatting them as both general, and time in format H:MM:SS. Have also tried doing a pivot table changing the field options to SUM of call duration. Screenshot attach with column is question i'm trying to sum.
View 5 Replies
View Related
Mar 30, 2009
I have a bunch of recordings on my DVR. So I put the titles and description onto a spreadsheet each in their own column. Then I created a "length of time" column. So why, in this attached spreadsheet, does the "grape" total autosum all the rows in that column correctly but the "cherry" total does not total it's column correctly?
I looked at the format of all cells in both columns and they are both set at h:mm.
View 5 Replies
View Related
Aug 16, 2012
i have an excel file in which i habe around 25 clients and their have different percentage set on as a comminsion on their net sales. the problem is that i was using if formula but is not accepting after 7 times.i studied that we cannot use if function more than 7 time..
so which formula i can use..
View 4 Replies
View Related
May 15, 2014
In cell N1 I have a time.
In cell R1 I want a formula that says if R1 is between 6am and 10pm, then return a 7.
how to use time in a formula.
View 3 Replies
View Related
Jan 28, 2014
I am trying trying to calculate the amount of time students view videos. I understand I should use [h]:mm:ss but excel continues to convert entries such as 0:14:59 (0 hours, 14 minutes, 59 seconds) to 12:14:49 PM both in the cell and the function bar.
The problem gets complicated because I have entered the data with two different formats; some in h:mm and some in h:mm:ss'
1) Is there an easy way to sum the duration time so it accurately reflects total hours:minutes:seconds?
2) Do I need to reformat or re-enter data to make it work?
3) If so, is there a macro to do it?
This has been a bear, (40 students by 30 videos) all hand coded.
View 5 Replies
View Related
Apr 21, 2007
How can i work out how long has passed between times, in excel.
my times are formatted as times eg 16:00 and 01:00 i then need them in base 100 so as i can work out labour percentages.
View 9 Replies
View Related
May 30, 2009
Book1.xls
Here is some dummy data and explanation with my problem...
I can't use usuall sumproduct because array of date doesn't match with data array... Since names are in alphabeticaly order you can see that Dave is sometime at first, second, third position.. there is more names etc...
I need to see how many times some name appear in last x time...
View 3 Replies
View Related
Aug 25, 2009
in cell F5 I would like to know how to count the times between 13:00 am and 14:00 so if theres 3 times it will show a 3 i havnt got a clue what formula to use.
View 14 Replies
View Related
Nov 3, 2009
I need a formula that gives me the difference between two different times
EG. 11:14:56 and 16:14:26, i want to find the difference/time between the two. Hope i'm making sense...
Also, does the time have to be in a time format on excel for the formula to work?
View 4 Replies
View Related
Nov 24, 2009
I had an excellent response last time I posted here, this time I’m stuck again with a new formula. I’m trying to calculated amounts between different times, but keep tying my self in knots with complicated IF formulas.
Is there an easier way to work out hours worked between 2 times, but too complicated things further I need three separate amounts so I’m guessing I’ll need three separate formulas
Hours between 00:00 – 06:00
Hours between 06:00 – 19:00
& hours between 19:00 – 00:00
An example could be, 05:00 – 20:00 should be 1,13,1
View 11 Replies
View Related