Select Random Sample from Prior Day with Specific Criteria

SoldOnTheRoad

New Member
Joined
Jan 3, 2017
Messages
13
I apologize for a duplicate/similar post, but my prior post was not answered correctly/sufficiently.

I have a large data set, with 22 employees that tracks their daily transactions. I want to obtain a random sampling of 1 transaction per person from the prior day.

Column A = Transaction Number (unique identifier)
Column B = Date of Transaction
Column C = Employee Name (all unique)

On a new sheet, I'd list each of the employees names and want ONE transaction number to appear next to their name.

I'm thinking I'd add a new column D for =rand() to assign each number a unique value, but I'm struggling with a formula to pull one transaction, per person, from the prior day. I'm thinking a combination of VLOOKUP, IF, and MAX; but I can't seem to get it right.
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"

Forum statistics

Threads
1,224,823
Messages
6,181,184
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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