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 did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
63,964
Office Version
  1. 365
Platform
  1. Windows
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.
 

dickpierce

Board Regular
Joined
Nov 26, 2004
Messages
148
Office Version
  1. 2007
Platform
  1. Windows
You Sir or Madam are a genius!!!! Thanks so much. Works like a charm! :LOL:
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,167,967
Messages
5,856,570
Members
431,820
Latest member
martel_9

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
Top