Writing a VBA to transpose row values (ignoring blanks)

I have this table here in which I’m trying to right a VBA that will take the products for each account and drop them into the Product Summary column.

For instance for the company on C2 ‘XYZ Inc’ their products are widget1 (H2) widget2 (I2) and widget4 (K2). I would like to transpose those values (ignoring the blanks) into column G. So cell G2 would have the product widget1, cell G3 would have widget2, and cell G4 would have widget4.

Same would be applicable for company on C5. Is there a VBA that would allow me to do that?


Excel example

By: Michael Oslin

Leave a Reply

Your email address will not be published. Required fields are marked *