Results 1 to 2 of 2
  1. #1
    AAAndy is offline Advanced Beginner
    Windows 7 64bit Access 2013 32bit
    Join Date
    Aug 2016
    Posts
    68

    how to combine two rows and add values of the two rows

    I have the following table

    Addressee Amount Total Payments Total Due Price A Merge
    Apple $10.00 $20.50 $50.15 $8.00 Yes
    Prune $11.00 $32.50 $30.15 $4.00 No
    Cherry $7.00 $8.50 $10.90 $1.00 No
    Apple $21.00 $10.20 $30.45 $5.00 Yes
    Orange $11.00 $14.20 $10.45 $2.00 No


    Orange $11.00 $15.20 $10.45 $2.00 No

    I want to combine alike Addressee's and add the values in those fields. The result would be the below. Is there a way to get that done?

    Addressee Amount Total Payments Total Due Price A Merge
    Prune $11.00 $32.50 $30.15 $4.00 No
    Cherry $7.00 $8.50 $10.90 $1.00 No
    Apple $31.00 $30.70 $80.60 $13.00 No
    Orange $11.00 $14.20 $10.45 $2.00 No
    Orange $11.00 $15.20 $10.45 $2.00 No

    There may be multiple duplicates, but I want to merge only the ones that say "Yes" for column Merge

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    My first thought is a union query that joins a totals query to combine the records with Yes, and a regular query to get the records with No.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Combine tables, many rows to one box
    By djay1991 in forum Queries
    Replies: 9
    Last Post: 04-18-2016, 09:35 AM
  2. Replies: 22
    Last Post: 12-20-2015, 02:46 AM
  3. Combine Two Rows - SQL Query
    By Somnath_IT2006 in forum Queries
    Replies: 1
    Last Post: 12-23-2011, 06:30 AM
  4. Replies: 2
    Last Post: 08-28-2011, 06:06 AM
  5. combine rows
    By summerAIS in forum Queries
    Replies: 3
    Last Post: 07-31-2010, 10:13 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