aravindhan_31
Well-known Member
- Joined
- Apr 11, 2006
- Messages
- 672
- Office Version
- 365
- 2019
- 2016
- Platform
- Windows
Hi,
below is the data that i have on excel.
Here is the existing process: ( all dummy data)
In a website we have to upload the discount % for a product(unique product code) in a particulate state and city, same product might be there in different cities.
there is Hirarchy created for all products. Product Code 1, 2, 3, 4 & 5 ( Product code 1 - Essentials
under that Product code 2, could be Fruits
under than product code 3 could be Apples/Papaya/melon etc >
under that Product code 4 could be Green Apple/Red Apples, etc>
Under that Product level 5 could be Size)
when we launch discounts, we could decide a % at a product code 1 level or 2 or 3 or 4 or 5. Example If we decide 5% discount for UK, London at product code level 1, then the same% is applied for all products comes under this product code 1, in this case for all essentials its 5% will be applied on the tool irrespective of what ever products comes under level code 1
But, If have to give 5% for all essentials and 10% discount for only for Apples, then I have create 2 rows to upload one with UK, London product code 1 & % column ( so that 5% is applied to all essentials)
and UK, London & product code 4 with 10% . I have 10000 rows of data with all code numbers and % at the last column & this is repetative tasks.
can someone help me with the VBA code that can create unique rows with 4 columns
State, City, Product Code, %
below is the data that i have on excel.
Here is the existing process: ( all dummy data)
In a website we have to upload the discount % for a product(unique product code) in a particulate state and city, same product might be there in different cities.
there is Hirarchy created for all products. Product Code 1, 2, 3, 4 & 5 ( Product code 1 - Essentials
under that Product code 2, could be Fruits
under than product code 3 could be Apples/Papaya/melon etc >
under that Product code 4 could be Green Apple/Red Apples, etc>
Under that Product level 5 could be Size)
when we launch discounts, we could decide a % at a product code 1 level or 2 or 3 or 4 or 5. Example If we decide 5% discount for UK, London at product code level 1, then the same% is applied for all products comes under this product code 1, in this case for all essentials its 5% will be applied on the tool irrespective of what ever products comes under level code 1
But, If have to give 5% for all essentials and 10% discount for only for Apples, then I have create 2 rows to upload one with UK, London product code 1 & % column ( so that 5% is applied to all essentials)
and UK, London & product code 4 with 10% . I have 10000 rows of data with all code numbers and % at the last column & this is repetative tasks.
can someone help me with the VBA code that can create unique rows with 4 columns
State, City, Product Code, %
Book1 | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | |||
1 | State | City | Product Level 1 Code | Product Level 2 Code | Product Level 3 Code | Product Level 4 Code | Product Level 5 Code | Disc Count % | ||
2 | TN | Pondi | 61646412 | 61678474 | 64746961 | 61678429 | 0.00% | |||
3 | TN | Pondi | 61646412 | 61682672 | 68144781 | 60001272 | 9.38% | |||
4 | TN | Chennai | 61646412 | 61682672 | 68144781 | 60001276 | 5.00% | |||
5 | Karnataka | Mysore | 61646412 | 61682672 | 68144781 | 60001278 | 27.10% | |||
6 | Karnataka | Mysore | 61646412 | 61682672 | 68144781 | 60001279 | 27.10% | |||
7 | Karnataka | Bangalore | 61646412 | 61682672 | 68144781 | 60001279 | 45.00% | |||
8 | TN | Madurai | 61646412 | 61886704 | 61669298 | 61669299 | 62277167 | 0.00% | ||
9 | Karnataka | Mysore | 61646412 | 61886704 | 62686064 | 66499141 | 36.84% | |||
10 | Karnataka | Mysore | 61646412 | 61886704 | 62686066 | 68144681 | 62686206 | 36.84% | ||
11 | TN | Pondi | 61646412 | 61886704 | 62686066 | 68401244 | 0.00% | |||
12 | Karnataka | Bangalore | 61646412 | 61886704 | 62686066 | 68401244 | 40.00% | |||
13 | TN | Pondi | 61646412 | 68144774 | 61666260 | 68144164 | 68144191 | 4.22% | ||
14 | TN | Chennai | 61646412 | 68144774 | 62226112 | 62997786 | 62997789 | 2.64% | ||
15 | TN | Chennai | 61646412 | 68144774 | 67686118 | 67694844 | 60002764 | 2.64% | ||
16 | TN | Pondi | 61646412 | 68144774 | 67686118 | 67694844 | 60002764 | 4.22% | ||
17 | TN | Pondi | 61646412 | 68144774 | 67686118 | 67694844 | 60002764 | 4.22% | ||
18 | Karnataka | Mysore | 61646412 | 68144774 | 67686118 | 67694844 | 60002764 | 40.00% | ||
19 | TN | Pondi | 61646412 | 68144774 | 67686118 | 67694844 | 4.22% | |||
Sheet1 |