abdo meghari
Well-known Member
- Joined
- Aug 3, 2021
- Messages
- 648
- Office Version
- 2019
Hello
I need macro to match CODE column (A) between two sheets , if they are matched then I want replace column B for MAIN sheet with column C for REPORT sheet and ignore BRANDS contain empty cells for column A in REPORT sheet .
result should sort from small to big based on column A and keep empty cell in the last
I need macro to match CODE column (A) between two sheets , if they are matched then I want replace column B for MAIN sheet with column C for REPORT sheet and ignore BRANDS contain empty cells for column A in REPORT sheet .
sa | ||||
---|---|---|---|---|
A | B | |||
1 | CODE | BRAND | ||
2 | BSJ100 | BS 1200R20 G580 JAP | ||
3 | BSJ100 | BS 1200R20 G580 JAP | ||
4 | BSJ100 | BS 1200R20 G580 JAP | ||
5 | BSJ100 | BS 1200R20 G580 JAP | ||
6 | BSJ100 | BS 1200R20 G580 JAP | ||
7 | BSJ101 | BS 1200R20 G580 THI | ||
8 | BSJ101 | BS 1200R20 G580 THI | ||
9 | BSJ101 | BS 1200R20 G580 THI | ||
10 | BSJ102 | BS 1200R24 G582 JAP | ||
11 | BSJ102 | BS 1200R24 G582 JAP | ||
12 | BSJ102 | BS 1200R24 G582 JAP | ||
13 | BSJ102 | BS 1200R24 G582 JAP | ||
14 | BSJ103 | BS 1200R20 R187 JAP | ||
15 | BSJ103 | BS 1200R20 R187 JAP | ||
16 | BSJ104 | BS 1200R20 R187 THI | ||
17 | BSJ105 | BS 1200R24 G580 JAP | ||
18 | BSJ105 | BS 1200R24 G580 JAP | ||
19 | BSJ106 | BS 13R22.5 R187 JAP | ||
20 | BSJ107 | BS 1400R20 R180 JAP | ||
21 | BSJ107 | BS 1400R20 R180 JAP | ||
22 | BSJ108 | BS 1400R20 R180BZ JAP | ||
23 | BSJ109 | BS 1400R20 VSJ JAP | ||
24 | BSJ109 | BS 1400R20 VSJ JAP | ||
25 | BSJ109 | BS 1400R20 VSJ JAP | ||
26 | BSJ110 | BS 155R12C R624 INDO | ||
27 | BSJ111 | BS 155R12C R623 INDO | ||
MAIN |
sa | |||||
---|---|---|---|---|---|
A | B | C | |||
1 | CODE | ITEM | BRAND | ||
2 | BSJ103 | 1 | BS 1200R20 R187 TCF | ||
3 | BSJ104 | 2 | BS 1200R20-18PR R187 THI | ||
4 | BSJ105 | 3 | BS 1200R24 G580 | ||
5 | 4 | BS 1200R20 G580 TCF | |||
6 | 5 | BS 1200R24 G582 JAP | |||
7 | BSJ107 | 6 | BS 1400R20 TCF R180 | ||
8 | 7 | BS 1400R20 TCF 20PR R180BZ JAP | |||
9 | BSJ109 | 8 | BS 1400R20 VSJ TCF | ||
10 | BSJ110 | 9 | BS 155 R12C R624 IND | ||
REPORT |
result should sort from small to big based on column A and keep empty cell in the last
sa | |||||
---|---|---|---|---|---|
A | B | C | |||
1 | CODE | ITEM | BRAND | ||
2 | BSJ103 | 1 | BS 1200R20 R187 JAP | ||
3 | BSJ104 | 2 | BS 1200R20 R187 THI | ||
4 | BSJ105 | 3 | BS 1200R24 G580 JAP | ||
5 | BSJ107 | 4 | BS 1400R20 R180 JAP | ||
6 | BSJ109 | 5 | BS 1400R20 VSJ JAP | ||
7 | BSJ110 | 6 | BS 155R12C R624 INDO | ||
8 | 7 | BS 1200R20 G580 TCF | |||
9 | 8 | BS 1200R24 G582 JAP | |||
10 | 9 | BS 1400R20 TCF 20PR R180BZ JAP | |||
REPORT |