Results 1 to 2 of 2

Thread: a ongoing 30 day total

  1. #1
    Junior Member
    Join Date
    Dec 2013
    Posts
    7
    Rep Power
    0

    a ongoing 30 day total

    After posting this problem on both excelforum.com and excelfox.com last month and getting a couple of replies asking
    different questions and offering help, but no one came up with a answer.

    So I am posting this again hoping this time round someone can see and understands what I'm trying to do.

    Below is the code I have written. I'm trying to create, build and keep a 30 day on going value total for cells
    listed in the code below.

    Cells BY6:DP20 gets new downloaded numbers daily and the results automatically go to their assigns cells GU3
    thru JJ181. But that's all their doing with this written code. the values show only the new download number
    value and does not do a on going total from the day(s) before. Hopefully someone can help me with errors in
    the code and put me on the right track to building and keeping a ongoing 30 day total.

    I started my code in this way, I clicked BY6 , then click Developer and clicked view code. then I put in the
    code you see below.

    Each section and each cell starting with GU3 is identified by Grade and Distance (A, B,C,D,M) (550, 660, 770)
    =COUNTIFS(BY$6:BY$20,1,$BR$6:$BR$20,"A",$BS$6:$BS$ 20,550) Showing that GU3 is looking for any race that is
    a Grade A to Grade M and running distance of 550 to 770, from cells BY6 thru DP20 in 15 races each night.

    This part works great with all the results from BY6 thru DP20 going to the right section and cell.

    Regardless the value of the numbers downloaded to BY6 thru DP20, the values going to GU3 thru JJ181,
    will always add just 1 to the cells getting numbers that day. So if BY6 downloaded number is 7 and it is
    going to GZ3, I only want its value to be a 1, not a 7 coming from BY6. then add 1 to go to what ever the
    value in cell GZ3. If GZ3 has a total of 4 before the new total will be 5.

    For some reason (code not completed or done right) the numbers do not add up for 2 days much less trying to build and maintain a 30 day on going total.
    Instead I just get the downloaded value put in BY6 thru DP20 that day. So GU3 THRU JJ181 are not giving
    me a on going total.Is there something else I need to add to the code to make it work or is there another way to do this.

    Being retired I have a lot of time on my hands. I try keeping up with Greyhounds. So I'm trying to learn
    enough about excel to make it easier for me to see how the dogs are doing daily. I'm just keeping my own data sheet. well trying to.

    So when I put the downloaded numbers in BY6 thru DP20, my total sections starting with GU3 are supposed to
    show me what grades and distance and how many times the speed, early speed, late speed etc. how many times
    the top speed dogs finished first and how many time it was 8th in the last 30 days, and same for the rest.

    I hope this help explain what I'm trying to do and what the purpose of both charts are for in the sample.
    one is for the daily downloaded numbers and the other will show the last 30 day results after I get it build
    up to 30 days and each downloaded numbers after 30 days will keep it on a on going 30 day total.
    Hopefully someone can help me figure out how to do this.

    I put the formula on GU3 THRU HB6 and JB3 THRU JJ6 on sample sheet 4 so I could get it down to size to upload
    the sample and for you to see how each cell is seperated by grade and distance, but on my finished sheet every
    cell from GU3 TO JJ181 that get value has the correct formula.but hopefully you get the jest of what I'm trying to do.
    Thanks

    Here is my code:
    Code:
    Private Sub Worksheet_Change(ByVal Target As Excel.Range)
    
        '//if the target range is in anywhere on range "BY6:DP20"
        If Not Intersect(Target, Range("BY6:DP20")) Is Nothing Then
        With Target
        If IsNumeric(.Value) Then
        Application.EnableEvents = False
        Range("GU3").Value = Range("HB218").Value + 1
        Range("HG3").Value = Range("HN218").Value + 1
        Range("HS3").Value = Range("HZ218").Value + 1
        Range("IE3").Value = Range("IL181").Value + 1
        Range("IQ3").Value = Range("IX181").Value + 1
        Range("JB3").Value = Range("JJ181").Value + 1
    
        Application.EnableEvents = True
        End If
        End With
        End If
    
        End Sub
    Attached Files Attached Files

  2. #2
    Junior Member
    Join Date
    May 2014
    Posts
    3
    Rep Power
    0
    I'm having a hard time wrapping my head around what you want. You have a lot of data and it's hard to understand what you are asking for and where you want to see the results. You have a formula in GU3, but in the code you have written you replace the value in GU3 with the value from another cell. I am willing to help, but you say you download everyday, but where does that data go, you have fixed formulas in some cells, but the code replaces that formula. You say you want cells with formulas to have numbers added to them? Have to think of a way to proceed.
    Last edited by bakerman; 05-23-2014 at 11:50 AM. Reason: No need to quote when directly answering a question.

Similar Threads

  1. Nth Such-And-Such Day Of The Month
    By Rick Rothstein in forum Rick Rothstein's Corner
    Replies: 6
    Last Post: 01-02-2020, 06:48 PM
  2. no color in rows which have the Total or Grand Total
    By paul_pearson in forum Excel Help
    Replies: 4
    Last Post: 09-16-2013, 05:24 AM
  3. Date Format From Start Day To End Day
    By PcMax in forum Excel Help
    Replies: 2
    Last Post: 03-10-2013, 02:07 PM
  4. Replies: 8
    Last Post: 12-28-2012, 11:10 AM
  5. Replies: 2
    Last Post: 10-20-2011, 10:15 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •