Data_Analyst
New Member
- Joined
- Jun 21, 2011
- Messages
- 12
What I am trying to do is find a string in one worksheet and if it matches the content of another worksheet, then it copies certain texts to it. I have been able to do that, but where I am stuck is if the same string matches the string on the other worksheet then it overwrites the previous content of the cell. So my question is how do I make it possible, so that it keeps the current content and basically adds the new content next to it?
(comma denotes new column)
Example:
Worksheet 1:
Account # , Data
12345 , A
67890 , B
45678 , C
89743 , D
12345 , E
Worksheet 2:
Account # , Data
12345
67890
45678
89743
Final Result:
Worksheet 2:
Account # , Data
12345 , A E
67890 , B
45678 , C
89743 , D
As you can see the string/account # on worksheet 1 was found twice with different data, so on worksheet two it basically pasted that data next to the existing one.
I have managed to paste the data if the string matches, but when it finds a same string (12345) it just pastes the new data on top of the old one (Pastes E over the A).
Any help would be appreciated with this.
Thank you!
(comma denotes new column)
Example:
Worksheet 1:
Account # , Data
12345 , A
67890 , B
45678 , C
89743 , D
12345 , E
Worksheet 2:
Account # , Data
12345
67890
45678
89743
Final Result:
Worksheet 2:
Account # , Data
12345 , A E
67890 , B
45678 , C
89743 , D
As you can see the string/account # on worksheet 1 was found twice with different data, so on worksheet two it basically pasted that data next to the existing one.
I have managed to paste the data if the string matches, but when it finds a same string (12345) it just pastes the new data on top of the old one (Pastes E over the A).
Any help would be appreciated with this.
Thank you!