Somapadidar
New Member
- Joined
- Oct 2, 2021
- Messages
- 12
- Office Version
- 2019
- Platform
- Windows
I have a file including 3 different columns. The contents of first one "name", are chosen from a list which has been defined in data validation before. It means its contents is limited. The content of second column "order" is numbers, which may be from 1 to 30 but there is no limitations on it. I want to find repeated rows versus columns "name" & "order" and if it occurs, write the number(order) which has been repeated and the sum of their 3rd columns, "amount", next to it in a table below, in front of its related name. The point is that for a particular name more than one different repeated order may occur which should be put in a row in the table respectively and of course there may be no duplicated value which means no data would be added in table. this is a sample and the desired table which has been filed by mine. I want to use VBA in this project.
NAME | ORDER | AMOUNT | ||||||||||||
1 | AA | 4 | 84 | |||||||||||
2 | BB | 3 | 5 | |||||||||||
3 | CC | 6 | 65 | |||||||||||
4 | DD | 6 | 12 | |||||||||||
5 | EE | 7 | 45 | |||||||||||
6 | FF | 9 | 76 | |||||||||||
7 | AA | 4 | 89 | |||||||||||
8 | DD | 1 | 9 | |||||||||||
9 | BB | 3 | 33 | |||||||||||
10 | EE | 3 | 12 | |||||||||||
11 | AA | 2 | 34 | |||||||||||
12 | EE | 7 | 56 | |||||||||||
13 | AA | 2 | 76 | |||||||||||
14 | BB | 3 | 12 | |||||||||||
15 | BB | 1 | 45 | |||||||||||
order | amount | order | amount | |||||||||||
AA | 4 | 173 | 2 | 110 | ||||||||||
BB | 3 | 50 | ||||||||||||
CC | ||||||||||||||
DD | ||||||||||||||
EE | 7 | 101 | ||||||||||||
FF | ||||||||||||||
GG | ||||||||||||||
HH | ||||||||||||||
II | ||||||||||||||
JJ | ||||||||||||||
KK |