Results 1 to 5 of 5
  1. #1
    miltos is offline Novice
    Windows XP Access 2003
    Join Date
    Feb 2011
    Posts
    2

    excel file solved in access


    my excel file is like that:

    Division, Date, HomeTeam, AwayTeam, STGH, STGA, SOTH, SOTA
    E0, 23/12/10, Arsenal, Everton, 3, 0, 10, 5
    E0, 28/12/10, Chelsea, Wolves, 4, 1, 15, 3
    etc

    I want for each HomeTeam and for each AwayTeam to sum up the last 6 and the last 3 rows of the cols ''STGH'', ''STGA'', ''SOTH'' and ''SOTA''.

    Is it possible with access?
    Thank you.

  2. #2
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    yes it is, through recordset usage only.

  3. #3
    miltos is offline Novice
    Windows XP Access 2003
    Join Date
    Feb 2011
    Posts
    2
    Quote Originally Posted by ajetrumpet View Post
    yes it is, through recordset usage only.
    Any ideas how?

    Thank you

  4. #4
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    well, open the recordset in vba and loop it, summing the last 6 rows to a variable. and if I'm now reading the OP correctly, you can import that data and run a query on it by summing each column and using the TOP predicate as well as a DESC order by clause. like so:
    Code:
    select top 6 dsum(this), dsum(that), etc...
    
    from table
    
    order by myfield DESC

  5. #5
    johnlinkson is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Feb 2011
    Posts
    1
    It is easy way to complete it.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Access link to excel file
    By delkath in forum Access
    Replies: 3
    Last Post: 09-13-2010, 12:28 PM
  2. making an excel file in access
    By dracula in forum Access
    Replies: 4
    Last Post: 08-27-2010, 04:24 PM
  3. Link from access forms to Excel file
    By aligahk06 in forum Forms
    Replies: 1
    Last Post: 04-30-2010, 04:24 AM
  4. Creating excel file from access vba
    By rparmar in forum Programming
    Replies: 3
    Last Post: 03-02-2010, 06:03 PM
  5. Replies: 1
    Last Post: 03-25-2009, 02:20 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums