EmilyExcel
New Member
- Joined
- Jun 27, 2014
- Messages
- 2
Hello! Please help me with this quandary for my internship. I would greatly appreciate it
Here is my problem:
</SPAN>
I want to match ID numbers in two columns by shifting the ID from Source 2 (and shifting its unique attributes along with it) so that it lines up in the proper row and matches the ID from Source 1. Both sources include ID numbers that the other one doesn’t have. I don’t want to delete those rows, but just leave the Source 2 cells that are lacking the information blank. Ideally the blank cells would be automatically highlighted. Here is what I am trying to do:</SPAN>
Before:</SPAN>
<TBODY>
</TBODY>
After:</SPAN>
<TBODY>
</TBODY>
Is there a command, formula, or macro you can suggest to automate this work? Otherwise I have to manually go through it. I look at “ID from Source 2” and if that doesn’t match the “ID from Source 1,” I delete “ID from Source 2” along with its “Source 2 unique attributes.” I then shift all of the Source 2 cells up the rows and check again if the new ID matches with the ID from Source 1. If not, delete and shift the cells up again. If it is obvious I simply do not have the necessary ID from Source 2, I leave it blank and continue down the row. I need to be careful to not just keep deleting Source 2 IDs that match IDs from Source 1 in rows farther down.</SPAN>
Thank you for your help
-Emily</SPAN>

</SPAN>
I want to match ID numbers in two columns by shifting the ID from Source 2 (and shifting its unique attributes along with it) so that it lines up in the proper row and matches the ID from Source 1. Both sources include ID numbers that the other one doesn’t have. I don’t want to delete those rows, but just leave the Source 2 cells that are lacking the information blank. Ideally the blank cells would be automatically highlighted. Here is what I am trying to do:</SPAN>
Before:</SPAN>
Source 1 unique attributes</SPAN> | ID from Source 1</SPAN> | ID from Source 2</SPAN> | Source 2 unique attributes</SPAN> |
AA</SPAN> | 1</SPAN> | 2</SPAN> | BA</SPAN> |
AB</SPAN> | 3</SPAN> | 3</SPAN> | BB</SPAN> |
AC</SPAN> | 5</SPAN> | 4</SPAN> | BC</SPAN> |
AD</SPAN> | 6</SPAN> | 5</SPAN> | BD</SPAN> |
AE</SPAN> | 8</SPAN> | 6</SPAN> | BE</SPAN> |
AF</SPAN> | 10</SPAN> | 11</SPAN> | BF</SPAN> |
AG</SPAN> | 12</SPAN> | 12</SPAN> | BG</SPAN> |
<TBODY>
</TBODY>
After:</SPAN>
Source 1 unique attributes</SPAN> | ID from Source 1</SPAN> | ID from Source 2</SPAN> | Source 2 unique attributes</SPAN> |
AA</SPAN> | 1</SPAN> | | |
AB</SPAN> | 3</SPAN> | 3</SPAN> | BB</SPAN> |
AC</SPAN> | 5</SPAN> | 5</SPAN> | BD</SPAN> |
AD</SPAN> | 6</SPAN> | 6</SPAN> | BE</SPAN> |
AE</SPAN> | 8</SPAN> | | |
AF</SPAN> | 10</SPAN> | | |
AG</SPAN> | 12</SPAN> | 12</SPAN> | BG</SPAN> |
<TBODY>
</TBODY>
Is there a command, formula, or macro you can suggest to automate this work? Otherwise I have to manually go through it. I look at “ID from Source 2” and if that doesn’t match the “ID from Source 1,” I delete “ID from Source 2” along with its “Source 2 unique attributes.” I then shift all of the Source 2 cells up the rows and check again if the new ID matches with the ID from Source 1. If not, delete and shift the cells up again. If it is obvious I simply do not have the necessary ID from Source 2, I leave it blank and continue down the row. I need to be careful to not just keep deleting Source 2 IDs that match IDs from Source 1 in rows farther down.</SPAN>
Thank you for your help
