worksheet function – Excel – How to “combine” columns for a row, and create duplicate rows for the values in the combined columns?


I have a table like below:

Account# Code1 Code2 Code3    
123      A     B     C

And I would like to removed columns “Code2” and “Code3”, and create new rows like below:

Account# Code    
123      A    
123      B    
123      C

Unfortunately I’m not sure what this would be called, and every search for “converting columns to rows” turns up with transposing results. Is there some excel function that I can use instead of copying the rows and manually doing it?