Pull and Match Random number

MiGon

New Member
Joined
Oct 27, 2020
Messages
28
Office Version
  1. 2013
Platform
  1. Windows
Hi All,
I need a help with the attached data. Need to pull 12 random numbers for each ID.
I mean for each UNIQUE ID need to get number from colum B where ID matches

Thanks a mill
MiGon
 

Attachments

  • Capture.JPG
    Capture.JPG
    130.3 KB · Views: 19

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Try in cell E2 and Drag right and down

Excel Formula:
=IFERROR(INDEX($B$2:$B$1000,AGGREGATE(15,6,(ROW($B$2:$B$1000)-ROW($B$2)+1)/($C$2:$C$1000=$C2),D$1)),"")
 
Upvote 0
=IFERROR(INDEX($B$2:$B$1000,AGGREGATE(15,6,(ROW($B$2:$B$1000)-ROW($B$2)+1)/($C$2:$C$1000=$C2),D$1)),"")
Hi Sufiyan97,
Thank you for the answer but I am getting blank
Thanks
MiGon
 
Upvote 0
Id_Last_UpdateNUMUnique ID123456789101112
AB1624 019987489AB1624 01
AB1624 019987509AH904 01
AB1624 019987667AK1656 01
AB1624 019987728AP087 01
AB1624 019987770BD547 01
AB1624 019987787BK1625 01
AB1624 019987813BS338 01
AB1624 019987847CD018 01
AB1624 019987907DB150 01
AB1624 019988227DM1663 01
AB1624 019988247DP300 01
JM968 019988287DS969 01
JM968 019988329EC052 01
JM968 019988448EM923 01
JM968 019988469JC1411 01
JM968 019988488JM1623 01
JM968 019988527JM968 01
JM968 019988587JS1437 01
JM968 019988690KB1407 01
JM968 019988889KL1664 01
RH1320 019988927LM402 01
RH1320 019989007LO1671 01
RH1320 019911567LO350 01
RH1320 019911587LS1642 01
RH1320 019911628MG672 01
RH1320 019911650MM1635 01
RH1320 019911727MO008 01
RH1320 019911769MO1241 01
RH1320 019911827PM298 01
RH1320 019911848RH1320 01
AB1624 019912027SM996 01
AB1624 019912070SP1653 01
 
Upvote 0
Do the numbers from col B have to be pulled at random?
 
Upvote 0
Ok, how about this, using a helper column in col C
+Fluff 1.xlsm
ABCDEFGHIJKLMN
1Id_Last_UpdateNUMUnique ID12345678910
2AB1624 0199874890.898508AB1624 019987787998822799876679987907998772899878139912027998777099875099912070
3AB1624 0199875090.803192AH904 01          
4AB1624 0199876670.505541AK1656 01          
5AB1624 0199877280.570061AP087 01          
6AB1624 0199877700.790683BD547 01          
7AB1624 0199877870.006266BK1625 01          
8AB1624 0199878130.62964BS338 01          
9AB1624 0199878470.847246CD018 01          
10AB1624 0199879070.561885DB150 01          
11AB1624 0199882270.47855DM1663 01          
12AB1624 0199882470.983957DP300 01          
13JM968 0199882870.020272DS969 01          
14JM968 0199883290.391673EC052 01          
15JM968 0199884480.50741EM923 01          
16JM968 0199884690.281464JC1411 01          
17JM968 0199884880.392467JM1623 01          
18JM968 0199885270.492281JM968 01998828799884699988690998832999884889988527998858799884489988889 
19JM968 0199885870.495079JS1437 01          
20JM968 0199886900.339259KB1407 01          
21JM968 0199888890.73381KL1664 01          
22RH1320 0199889270.272037LM402 01          
23RH1320 0199890070.318849LO1671 01          
24RH1320 0199115670.96604LO350 01          
25RH1320 0199115870.645709LS1642 01          
26RH1320 0199116280.769054MG672 01          
27RH1320 0199116500.825364MM1635 01          
28RH1320 0199117270.348458MO008 01          
29RH1320 0199117690.23924MO1241 01          
30RH1320 0199118270.260804PM298 01          
31RH1320 0199118480.640203RH1320 019911769991182799889279989007991172799118489911587991162899116509911567
32AB1624 0199120270.632466SM996 01          
33AB1624 0199120700.807402SP1653 01          
List
Cell Formulas
RangeFormula
E2:N33E2=IFERROR(INDEX($B$2:$B$100,AGGREGATE(15,6,(ROW($B$2:$B$100)-ROW($B$2)+1)/($A$2:$A$100=$D2)/($C$2:$C$100=SMALL(IF($A$2:$A$100=$D2,$C$2:$C$100),E$1)),1)),"")
C2:C33C2=RAND()
 
Upvote 0
Hi Fluff,
Still not quite fix, as Need all the time 12 numbers against each ID
thanks
 
Upvote 0
With the sample you gave not all of the values occur 12 times.
 
Upvote 0

Forum statistics

Threads
1,214,920
Messages
6,122,276
Members
449,075
Latest member
staticfluids

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