Largest of a set of numbers problem.

dickpierce

Board Regular
Joined
Nov 26, 2004
Messages
148
Office Version
  1. 2007
Platform
  1. Windows
Hello! Access newbie here. This is the query problem I have and below is the desired tabled result. G is a sum total.

Name Pos G

a 1b 1470
a c 32
b cf 765
b dh 432
b rf 32
b 1b 111
c lf 8
c 2b 77
c ss 543

Desired Result
a 1b 1470
b cf 765
c ss 543

Any help would be appreciated. Thanks
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
I can do this using two queries.

Let's say that your table is named Table1 and your fields are Field1, Field2, and Field3.

Create a new query from table 1, selecting Field1 and Field3. Click on the Totals button (looks like a Sigma). This should add the phrase "Group By" under each of the fields in the query. Under Field3, change the "Group By" to "Max". Let's save this query as Query1.

Now create a new query adding Query1 and Table 1 to it. Create relationships between the Field1 in Table1 and Query 1, and between MaxOfField3 from Query1 and Field3 in Table1.

Now, in click on the asterisk (*) in the Table1 box to add all these field to your query. Now view you query and you should have your desired results.

These two queries could probably be combined to one large query using SQL, if desired.
 
Upvote 0
You Sir or Madam are a genius!!!! Thanks so much. Works like a charm! :laugh:
 
Upvote 0

Forum statistics

Threads
1,222,118
Messages
6,164,072
Members
451,870
Latest member
Nikhil excel

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top