Help to create sorted tables.

stereoqt

New Member
Joined
Jan 27, 2020
Messages
10
Office Version
  1. 2019
Platform
  1. Windows
Good night! First time posting a question on the forum, in the past it has helped me a lot to clarify several doubts, so I think it's appropriate to ask for help or advice here.

I have a spreadsheet that I use as follows:

The ABC and EFG tables serve the same function, manually entering data containing the product ranking, name and volume (more volume equals higher ranking).
The IJKL and MOPQ tables have the same function, the I and N column generate random numbers that I then use in the J and O columns to generate a list of 30 random products. In columns K and P, I order the numbers obtained from lowest to highest ranking (highest to lowest volume) and in columns L and Q I look for the name of the corresponding product.

The formulas I use are the following:

Columns I and N) =rand()
Columns J and O) =INDEX($A$2:$A$51,RANK.EQ(I2,$I$2:$I$51)+COUNTIF($I$2:I2,I2)-1,1)
Columns K and P) =SMALL($J$2:$J$31.1)
Columns L and Q) =VLOOKUP(K2,$A$2:$C$51,2)

Basically now I need to generate the same random list (30 items), but using the following volume criteria:
100,000,000 to 999,999,999 (1 item)
10,000,000 to 99,999,999 (1 item)
1,000,000 to 9,999,999 (2 items)
100,000 to 999,999 (4 items)
10,000 to 99,999 (4 items)
1,000 to 9,999 (8 items)
100 to 999 (8 items)
10 to 99 (1 item)
1-9 (1 item)

I mean:
1 random item from all those with volume between 100,000,000 to 999,999,999
1 random item from all those with volume between 10,000,000 to 99,999,999
2 random items from all those with volume between 1,000,000 to 9,999,999
etc.

A friend told me that I could create dynamic tables to do the filtering, but I don't have enough technical knowledge.

Could you guys help me out? Thanks in advance!
 

Attachments

  • Screenshot_67.png
    Screenshot_67.png
    103.6 KB · Views: 12

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

Forum statistics

Threads
1,215,029
Messages
6,122,760
Members
449,095
Latest member
m_smith_solihull

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