Hello Guys,
I’ve an excel sheet filled with about 5000 entries and I’m looking to sort them and came across a problem that cannot be solved without coding. I just wanted to get opinion from you guys. Please post the full code if possible. I don't know if I can do it with macro alone or if I need VBA or it can be solved by entering a formula in the formula bar. Anyway please walk me through the code too if possible. I really appreciate the help. I have attached the images step by step to make it easier for you. So, I’ll explain.
I have two columns as shown in the picture I’ve uploaded. (Image Link: http://www.excelforum.com/attachment...1&d=1464165169)
As you’ve seen column A contain names and column B contains information about what that name corresponds to. Now just like this there are about 4765 entries in my excel worksheet. What I need to do is eliminate the duplicates. Like in the image you can see that the name Jimmy appears 3 times in column A and each time it has a corresponding B column value. What I need to do is to do the following:
1. Check for duplicates in column ‘A’. (Image Link: http://i68.tinypic.com/14119at.png)
2. For the duplicates found in column ‘A’ check if the corresponding ‘B’ cell has duplicates. (Image Link: http://i65.tinypic.com/6ggeow.png)
3. If ‘A’ and ‘B’ cells are exact duplicates then delete the duplicate value or clear the duplicate cell. (Image Link: http://i64.tinypic.com/1qmii9.png)
4. If ‘B’ value is unique and ‘A’ value has duplicates then concatenate ‘B’ values with comma separator. (Image Link: http://i67.tinypic.com/4zyxzk.png)
5. Then after concatenation delete the rest of the duplicate ‘A’ and corresponding ‘B’ values leaving only one ‘A’ value and concatenated corresponding ‘B’ value.
Bookmarks