Link to home
Start Free TrialLog in
Avatar of neoptoent
neoptoentFlag for United States of America

asked on

VBA to check for same account and move all data to one row

Hi,

I currently have a excel sheet that has an account number name and tel number amongst other columns.
For many of the account numbers, there will be multiple rows for a husband and wife of tel numbers.

I need to be able to move all the phone numbers for each account into one row and be able to identify who the account should go to.

I know if my head what the code should be , but cant seem to figure out how to actually write the code.

The code should look at Column A2  if the value is the same as the row above move column C and E to the same row as the first.. then move to the next row, if it is the same as above or above above, move the  rows.... Also it should label the primary row

I have attached a sample along with what the output should be ( modifications are shown in red)

Any help would be great
testdata.xlsx
testdataresult.xlsx
ASKER CERTIFIED SOLUTION
Avatar of tdlewis
tdlewis
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial