# Add "Texts Value" to ranges randomly based on Criteria

#### aravindhan_31

##### Well-known Member
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

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

#### AlanY

##### Well-known Member
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

#### aravindhan_31

##### Well-known Member
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

Replies
11
Views
112
Replies
8
Views
122
Replies
1
Views
36
Replies
2
Views
67
Replies
1
Views
34