# Largest of a set of numbers problem.

#### dickpierce

##### Board Regular
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

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).

#### Joe4

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
You Sir or Madam are a genius!!!! Thanks so much. Works like a charm!

Replies
1
Views
127
Replies
6
Views
198
Replies
1
Views
228
Replies
6
Views
291
Replies
1
Views
565

1,129,803
Messages
5,638,441
Members
417,025
Latest member
MusterDuster

### 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.

### Which adblocker are you using?

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

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