Keep only 1 record with the Newest date

yomero

Active Member
Joined
May 14, 2008
Messages
257
Hi,

I have a table with a list of users. Currently there are duplicated users since the records are from different dates.

how can I tell the query/criteria

if userID >1 then
keep only ONE
with the newer DATE

Thank you
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Please provide the names of your table, and your user id and date fields.
 
Upvote 0
If you still need UserId >1, add another field, Count of UserID, with >1 in the Criteria line.
All of these in a Totals Query.
 
Last edited:
Upvote 0
Thanks, I followed your suggestions and it works.

I have another question:

I have 3 columns
- Application (it contains multiple applications, and accepts duplicates)
- Date
- Number of users (it displays the number of users per application per day)

I created a TOTALS Query and asked to show MAX value of numbers of users.
How can I get the Date of that MAX value?

Example: MAX Value for Application X = 97%...if I dig in the Data table I find it in January 15, 2015....

Expected result
Application 1 / 97% / January 15, 2015
Application 2 / 85% / February 5, 2014
Application 3 / 25% / January 10, 2015

Thanks.
 
Upvote 0
I created a TOTALS Query and asked to show MAX value of numbers of users.
How can I get the Date of that MAX value?
Link your Aggregate Query back to your original table, linking on the User and Value, and then you can pull the date of that record.
 
Upvote 0

Forum statistics

Threads
1,221,893
Messages
6,162,662
Members
451,781
Latest member
DylantheD

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