Add "Texts Value" to ranges randomly based on Criteria

aravindhan_31

Well-known Member
Joined
Apr 11, 2006
Messages
672
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
Hi,

I tried enough but stuck with this problem. request someone to help:(

I have list of 10000 Order Ids in column A, & Customer Name in column B. Order Ids are duplicated, some orders will be 20, some order ids will be 50 etc.

In Column C i want to give this data. 5% of order Ids Vs total count should be tagged as "Category A" 10% of order Ids should be "Category B", 10% should be "Category C" , 20% should be "Category D" & rest should be "Category E"

ex:
assuming i have 15 same Order Ids for 15 customers.( 15 rows) 5% of 15 = 0.75 take it as 1 customer will be tagged as "Category A" for 1 row
assuming i have 15 same Order Ids for 15 customers. 10% of 15 = 1.25 take it as 1 customer will be tagged as "Category B" for row 2
assuming i have 15 same Order Ids for 15 customers. 15% of 15 = 2.25 take it as 2 customer will be tagged as "Category C" for row 3 & row 4
assuming i have 15 same Order Ids for 15 customers. 10% of 15 = 2.5 take it as 2 customer will be tagged as "Category D"
assuming i have 15 same Order Ids for 15 customers. 20% of 15 = 3.0 take it as 3 customer will be tagged as "Category E"
remaining customers as Category E

Let me know if more clarification Req, I am happy to revert.

thanks for the help in advance.
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
ex:
assuming i have 15 same Order Ids for 15 customers.( 15 rows) 5% of 15 = 0.75 take it as 1 customer will be tagged as "Category A" for 1 row
assuming i have 15 same Order Ids for 15 customers. 10% of 15 = 1.25 take it as 1 customer will be tagged as "Category B" for row 2
assuming i have 15 same Order Ids for 15 customers. 15% of 15 = 2.25 take it as 2 customer will be tagged as "Category C" for row 3 & row 4
assuming i have 15 same Order Ids for 15 customers. 10% of 15 = 2.5 take it as 2 customer will be tagged as "Category D"
assuming i have 15 same Order Ids for 15 customers. 20% of 15 = 3.0 take it as 3 customer will be tagged as "Category E"
remaining customers as Category E

can and check and confirm if there are any mistakes for the RED above, as it doesn't make any sense.

or provide a small sample of the data
 
Upvote 0
apologies,
please find below. 5% of customers to be tagged as A, 10% as B, 15% as C, 20% as D & remaining as E
ex:
assuming i have 15 same Order Ids for 15 customers.( 15 rows) 5% of 15 = 0.75 take it as 1 customer will be tagged as "Category A" for 1 row
assuming i have 15 same Order Ids for 15 customers. 10% of 15 = 1.5 take it as 1 customer will be tagged as "Category B" for row 2
assuming i have 15 same Order Ids for 15 customers. 15% of 15 = 2.25 take it as 2 customer will be tagged as "Category C" for row 3 & row 4
assuming i have 15 same Order Ids for 15 customers. 20% of 15 = 3.0 take it as 3 customer will be tagged as "Category D"
remaining customers as Category E

Regards
Arvindn
 
Upvote 0

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