Sampling of data using macros

Status
Not open for further replies.

Sailadarohit

New Member
Joined
Sep 7, 2022
Messages
39
Office Version
  1. 365
  2. 2021
  3. 2019
  4. 2016
Platform
  1. Windows
Book1 (version 3).xlsb
ABC
1U.ID(Not Unique)Main ID (Unique)Priority
2110High
3111Medium
4212Medium
5313Low
6514High
7415Low
8716Medium
9517High
10718Medium
11119Medium
12220Low
13821High
14922Low
15623Medium
16524High
17425Medium
18226Medium
19827Low
20128High
21629Low
22930Medium
23331High
24632Medium
25933Medium
26134Low
27135High
28236Low
29337Medium
30538High
31439Medium
32740Medium
33541Low
34742High
35143Low
36244Medium
37845High
38946Medium
39647Medium
40548Low
41449High
42250Low
43851Medium
44152High
45653Medium
46954Medium
47355Low
48656High
49957Low
Sheet1


There is a use case where we have U.ID which is not unique, main ID which is unique and priority which covers high, medium and low. In a general scenerio we have mutiple Main ID's associated with one U.ID . For audit purpose we require a sample of this data which will have only 3 random main ID's (not top 3) associated with each U.ID.
Please note in real scenario this is a huge data set so manually doing this is not possible.
Can anyone help with a macro for this as we have more than 5 lakh rows to process and formulas are not working stating error message "excel ran out of resources while attempting to calculate"
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Duplicate to: Sampling of data using formula or macros

In future, please do not post the same question multiple times. Per Forum Rules (#12), posts of a duplicate nature will be locked or deleted.

In relation to your question here, I have closed this thread so please continue in the linked thread. If you do not receive a response, you can "bump" it by replying to it yourself, though we advise you to wait 24 hours before doing so, and not to bump a thread more than once a day.
 
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,224,823
Messages
6,181,177
Members
453,021
Latest member
Justyna P

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