Hello
I need macro for about 1000 rows to replace any unmatched items in column B for two sheets(sheet1,2) with matched items sheet MAIN, but when replace the items umatching with items into column B into cells for two sheets(sheet1,2) depends on corresponding cell into column B for the same cell for two sheets(sheet1,2) .
for instance if the items in sheet1,2 for cell B2 unmatched with cell B2 in sheet MAIN then should replace based on sheet main for the same cell B2 corresponding cell into column B and the same thing for the others cells .
SHEET MAIN
sheet1
sheet2
result
sheet1
sheet2
thanks
I need macro for about 1000 rows to replace any unmatched items in column B for two sheets(sheet1,2) with matched items sheet MAIN, but when replace the items umatching with items into column B into cells for two sheets(sheet1,2) depends on corresponding cell into column B for the same cell for two sheets(sheet1,2) .
for instance if the items in sheet1,2 for cell B2 unmatched with cell B2 in sheet MAIN then should replace based on sheet main for the same cell B2 corresponding cell into column B and the same thing for the others cells .
SHEET MAIN
CL.xlsm | ||||
---|---|---|---|---|
A | B | |||
1 | S.N | ITEM | ||
2 | 1 | TR 200M45MM LK H K/L | ||
3 | 2 | TTR 12200S45 MN 123 | ||
4 | 3 | TR 1425/148V MN 123H K/L | ||
5 | 4 | TR 200M45 MM 123H K/L SS | ||
6 | 5 | TR 2.5M100* 123H K/L | ||
7 | 6 | TR 2.5M100**123H K/L | ||
8 | 7 | CTR 12-200M45 MM 123H K/L | ||
MAIN |
sheet1
CL.xlsm | |||||
---|---|---|---|---|---|
A | B | C | |||
1 | S.N | ITEM | QUANTITY | ||
2 | 1 | TR 200M451NMM LK H K/L | 12 | ||
3 | 2 | TTR 12200S45 MN 1234 | 11 | ||
4 | 3 | TR 1425/148V MN 123HH K/L | 10 | ||
5 | 4 | TR 200M45 MM 123H K/L SS | 20 | ||
6 | 5 | TR 2.5M100**123H K/L | 25 | ||
7 | 6 | TR 2.5M100**123H K/LM | 30 | ||
8 | 7 | CCTR 12-200M45 MM 123H K/L | 20 | ||
SHEET1 |
sheet2
CL.xlsm | |||||
---|---|---|---|---|---|
A | B | C | |||
1 | S.N | ITEM | QUANTITY | ||
2 | 1 | TR 1200M45MM LK H K/L | 20 | ||
3 | 2 | TTRR 1200S45 MN 123 | 10 | ||
4 | 3 | TR 1425/148V MN 123H K/L | 11 | ||
5 | 4 | TR 200M45 MM 123H K/L SS | 12 | ||
6 | 5 | TR 22.5M100* 123H K/L | 13 | ||
7 | 6 | TR 2.5M1100**123H K/L | 14 | ||
SHEET2 |
result
sheet1
CL.xlsm | |||||
---|---|---|---|---|---|
A | B | C | |||
1 | S.N | ITEM | QUANTITY | ||
2 | 1 | TR 200M45MM LK H K/L | 12 | ||
3 | 2 | TTR 12200S45 MN 123 | 11 | ||
4 | 3 | TR 1425/148V MN 123H K/L | 10 | ||
5 | 4 | TR 200M45 MM 123H K/L SS | 20 | ||
6 | 5 | TR 2.5M100* 123H K/L | 25 | ||
7 | 6 | TR 2.5M100**123H K/L | 30 | ||
8 | 7 | CTR 12-200M45 MM 123H K/L | 20 | ||
SHEET1 |
sheet2
CL.xlsm | |||||
---|---|---|---|---|---|
A | B | C | |||
1 | S.N | ITEM | QUANTITY | ||
2 | 1 | TR 200M45MM LK H K/L | 20 | ||
3 | 2 | TTR 12200S45 MN 123 | 10 | ||
4 | 3 | TR 1425/148V MN 123H K/L | 11 | ||
5 | 4 | TR 200M45 MM 123H K/L SS | 12 | ||
6 | 5 | TR 2.5M100* 123H K/L | 13 | ||
7 | 6 | TR 2.5M100**123H K/L | 14 | ||
SHEET2 |
thanks