Halley yenn
New Member
- Joined
- Mar 17, 2021
- Messages
- 32
- Office Version
- 365
- Platform
- Windows
Hello,
I have a excel with multiple columns my main goal is to fill column A and column C as per Column B.
For ex:
COLA COLB COLC
1 18484 1
2 9848893 1
3 1234 1
3 1234 2
3 1234 3
.
.
In this if the the value in COLB is same then the respected cell values in COLA should be same as mentioned above and COLC value should increment .I will have only COLB data where the macro shold fill COLA and COLC ...COLA should increment to 1 2 3....if any repeated value then that must be repeated...COLC should be 1 for diff values in COLB and should increment for the Same numbers in COLB.
My explanation may not be clear so I am attaching the sample excel screenshot, where in sheet 1 you can see the actual data and in sheet2 the desired output with the macro.
Kindly help me on this as the data will be in thousands of rows which is time consuming.
KR,
Halley
I have a excel with multiple columns my main goal is to fill column A and column C as per Column B.
For ex:
COLA COLB COLC
1 18484 1
2 9848893 1
3 1234 1
3 1234 2
3 1234 3
.
.
In this if the the value in COLB is same then the respected cell values in COLA should be same as mentioned above and COLC value should increment .I will have only COLB data where the macro shold fill COLA and COLC ...COLA should increment to 1 2 3....if any repeated value then that must be repeated...COLC should be 1 for diff values in COLB and should increment for the Same numbers in COLB.
My explanation may not be clear so I am attaching the sample excel screenshot, where in sheet 1 you can see the actual data and in sheet2 the desired output with the macro.
Kindly help me on this as the data will be in thousands of rows which is time consuming.
KR,
Halley
example sheet.xlsx | ||||||
---|---|---|---|---|---|---|
A | B | C | D | |||
1 | orderkey | ID | order reference ID | |||
2 | 10987 | |||||
3 | 56843 | |||||
4 | 6744521 | |||||
5 | 89076213 | |||||
6 | 89076213 | |||||
7 | 89076213 | |||||
8 | 89076213 | |||||
9 | 986 | |||||
10 | 73123 | |||||
11 | 8761 | |||||
12 | 17283 | |||||
13 | 17283 | |||||
14 | 17283 | |||||
Sheet1 |
example sheet.xlsx | ||||||
---|---|---|---|---|---|---|
A | B | C | D | |||
1 | orderkey | ID | order reference ID | |||
2 | 1 | 10987 | 1 | |||
3 | 2 | 56843 | 1 | |||
4 | 3 | 6744521 | 1 | |||
5 | 4 | 89076213 | 1 | |||
6 | 4 | 89076213 | 2 | |||
7 | 4 | 89076213 | 3 | |||
8 | 4 | 89076213 | 4 | |||
9 | 5 | 986 | 1 | |||
10 | 6 | 73123 | 1 | |||
11 | 7 | 8761 | 1 | |||
12 | 8 | 17283 | 1 | |||
13 | 8 | 17283 | 2 | |||
14 | 8 | 17283 | 3 | |||
Sheet2 |