0

I am trying to merge rows in my sheet based on column value matches. Specifically, I have two columns I would like to check for matches - Last Name (Column B) and Email Address (Column C). If matches are found in both these columns, then the two rows must be merged. Please look at the screenshots below to see what I am trying to achieve.

This is the original worksheet.

This is the desired result.

Note that there are many more columns in the worksheet, with the user able to add in new columns at the end as required. I would like to be able to merge across all these columns as long as the column values in B and C are the same.

Some of the other code I have come across either limits the number of columns to be merged across or checks against one column only (e.g. only Column B and not column C). I am quite new to VBA and hence would appreciate any pointers here.

New contributor
098po is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Your Answer

098po is a new contributor. Be nice, and check out our Code of Conduct.

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.