简体   繁体   中英

excel merge rows based on column values

So I've been searching for the information I need and have not really been able to find a simple solution, though it seems like there should be one. Basically, I have the following

John | Doe | 123 Wallaby Ln |00123 | | |

John | Doe | | 00123 | xxx | yy |

Jane | Doe | | 01234 | | zz |

Jane | Doe | bleep blop ln | | xx | |

And I need

John | Doe | 123 Wallaby Ln |00123 | xxx| yy |

Jane | Doe | bleep blop ln | 01234 | xx | zz |

Basically pretty simple, I need to merge cells with the same Column 1 & Column 2 data to get as comprehensive and concise a list of data. You'd think this would be readily available through google as a simple formula but I have only found VBA solutions (I have never used VBA before, or macros for that matter so I'm not sure how to use them or fix errors in them). Any help is greatly appreciated.

Thanks in advance!

The easiest option is to merge the content of A & B in one column ( insert a new column in C)

C1    =A1&" "&B1

Roll down the formula

Sort per column C

Make sure you have descriptive name on row 1 to describe your column.

Select the complete table

Create a pivot table, drop the C column in the row section to obtain the list of unique name.

Copy the list of unique names in a new sheet

and then look at vlookupall describe here excel vlookup with multiple results to create your own function.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM