Mark all records based on record groups

litrelord

Well-known Member
Joined
Dec 1, 2002
Messages
519
Hi,

sorry for the awful question title but i couldn't think how to put this simply.

I have a table full of records, many of which have more than one row with the same account number. If one row containing the account number matches a certain criteria I'd like to mark all records with that account number. e.g. account number 12345 has one record that has a column marked true, I need all records for 12345 to have another column marked as true.

I ran a query for all records marked as true (Qry_True_Test) and their file numbers thinking I could use a join on the two queries to test but it's marking all records whether or not they appear in the Qry_True_Test query.

I realise it would be more efficient to have all the account details stored in one table and the rest of the data in another. That's a whole different project for me though :D

Thanks

Nick
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
I would create an Aggregate query that lists your account number, and the field you want to check to see if it is true. Place your criteria under this field to limit it to "True" responses. Then click on the Total icon (looks like a Simga). This would "Group" all the records toegether of like values (so if you have two records with Account # 12345 with a value of True, it will only show up once).

Now link this aggregate query to your original table on Account Number. Be sure to do a Left Join so it will include all of the records in your table. You can then return the other field (True) from the Aggregate Query.

I think that should give you what you want.
 
Upvote 0
That was it perfectly. I hadn't grouped the query and that made all the difference.

Many thanks

Nick
 
Upvote 0

Forum statistics

Threads
1,214,583
Messages
6,120,377
Members
448,955
Latest member
BatCoder

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