+ Reply to Thread
Results 1 to 3 of 3

Thread: Count records between two results

  1. #1
    Registered User
    Join Date
    06-12-2009
    Location
    plymouth
    MS-Off Ver
    Excel 2003
    Posts
    5

    Question Count records between two results

    Hello,

    I have a table that stores football results that looks thus

    FREF  Fdate      SREF   HomeTeam AwayTeam HomeScore AwayScore Result Venue Attend Ref     Report CompREF MREF    BGcolor Fcolor Done
    20001 22/09/2010 200910 ExeC     PlyA     3         0         W      SJP   5000   BloggsJ Text   CCL1    BloggsT red     blue   Y
    
    etc

    I'd like to be able to count what the highest number of consecutive wins is (Result="W") when ordered by FDate

    Any ideas?

  2. #2
    Valued Forum Contributor alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Lake County, Illinois
    MS-Off Ver
    MS Office 2010, 2007 and 2002
    Posts
    1,161

    Re: Count records between two results

    Look at this and and set your criteria in your Result field to =W

    http://www.techonthenet.com/access/f...eric/count.php

    Alan
    Last edited by alansidman; 09-22-2010 at 04:45 PM. Reason: Oops! Missed the part about consecutive. This may not work.

  3. #3
    Registered User
    Join Date
    06-12-2009
    Location
    plymouth
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Count records between two results

    Hi Alan, I don't think i've explained myself properly, i'll have another go.

    Consider a table, Fixtures

    FDate       Result
    01/01/2000  W
    02/01/2000  D
    03/01/2000  D
    04/01/2000  D
    05/01/2000  W
    06/01/2000  W
    07/01/2000  L 
    08/01/2000  W
    I'd like a query that will count the number of consecutive duplicates when ordered by FDate. Therefore giving the result

    Result  Count  FDate
    D       3      02/01/2000
    W       2      05/01/2000
    W       1      01/01/2000
    L       1      07/01/2000
    W       1      08/01/2000
    Hope this makes sense

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.2.0