patty123467
New Member
- Joined
- Jul 24, 2015
- Messages
- 44
How can I create a code that will compare sheets and replace another column when there is a unique identifier found. Sheet 1 and 2, column A will contain a unique ID but they wont be in the same order. Sheet 1 and 2 will have column B containing non-unique data. I need for sheet 1 column B to be replaced with the text in sheet 2 column b when there is a unique ID found in column a on sheets 1 and 2. See below example.
Sheet 1</SPAN>
<TBODY>
</TBODY>
Sheet 2</SPAN>
<TBODY>
</TBODY>
Apple would change to blue</SPAN>
Pear would change to red</SPAN>
banana would change to yellow</SPAN>
Sheet 1</SPAN>
Test1</SPAN></SPAN> | Test2</SPAN></SPAN> |
z123</SPAN></SPAN> | apple </SPAN></SPAN> |
z1234</SPAN></SPAN> | pear</SPAN></SPAN> |
z12345</SPAN></SPAN> | banana </SPAN></SPAN> |
<TBODY>
</TBODY>
Sheet 2</SPAN>
Test1</SPAN></SPAN> | Test2</SPAN></SPAN> |
z1234</SPAN></SPAN> | red</SPAN></SPAN> |
z123</SPAN></SPAN> | blue</SPAN></SPAN> |
z12345</SPAN></SPAN> | yellow</SPAN></SPAN> |
<TBODY>
</TBODY>
Apple would change to blue</SPAN>
Pear would change to red</SPAN>
banana would change to yellow</SPAN>