Hi Can I ask for a sample macro code to compare 2 different columns from 2 different sheets. At the end there' my code
Here's the columnA in sheet1
ColumnA |
ColumnB |
red |
|
orange |
|
blue |
|
green |
|
Here's the column A in sheet2
ColumnA |
ABC:green |
ABC:pink |
ABC:violet |
ABC:blue |
ABC:orange |
ABC:black |
Here's what I need to make as an output in sheet1
ColumnA |
ColumnB |
red |
|
orange |
ABC:orange |
blue |
ABC:blue |
green |
ABC:green |
Then all cells in column A sheet1 without match such as red in the picture above should be cut and copied in column C in sheet1 like the below
ColumnA |
ColumnB |
ColumnC |
orange |
ABC:orange |
red |
blue |
ABC:blue |
|
green |
ABC:green |
|
lastly all cells in column A sheet 2 that has no match should be cut as well and pasted in column D in sheet 1 such as ABC:PINK, ABC:VIOLET and ABC:BLACK as shown below
ColumnA |
ColumnB |
ColumnC |
ColumnD |
orange |
ABC:orange |
red |
ABC:pink |
blue |
ABC:blue |
|
ABC:violet |
green |
ABC:green |
|
ABC:black |
Thanks for the help in advance.
Now here's my code (this is as far as I can go ince i'm still a newbie consider the knowledge i have with regards to VAB coding
Bookmarks