Link to home
Start Free TrialLog in
Avatar of jana
janaFlag for United States of America

asked on

Use excel transpose or similar

Hi,

We have a super big excel with over 1,200 rows 255 columns (rows=modems, columns=ports).  We have been using excel transpose to just have 2 columns modems and ports (see below example).

Modem   Port-01 Port-02 Port-03
-------- ------ ------- --------
NetGear   4672   555    SMS
Arris     non     x     SMS

Open in new window


We want to convert the data into 2 columns as follows:

Modem	Ports
------------------------
NetGear	4672
NetGear	555
NetGear	SMS
Arris	non
Arris	x
Arris	SMS

Open in new window


We have used excel transpose, but we have to do this one row by row.

Is there a way for using transpose or another  function so we can get the result we are  looking for?
(attached sample files of current and trying to accomplish)
Avatar of jana
jana
Flag of United States of America image

ASKER

(oops! forgot to attachment)
Columns-to-Rows.xlsx
Avatar of Ejgil Hedegaard
Try attached, press button to run.
Columns-to-Rows.xlsm
Avatar of jana

ASKER

Thanx! I thought that there was a way with transpose, but thank you, VBA is the way.

Prior closing the question,
- Can you give a brief on the statement "Set wsIn = ThisWorkbook.Worksheets("Sheet2")"
- Also, in the real excel we have over 200 columns, where do I increase the value to consider converting those columns also to rows?
ASKER CERTIFIED SOLUTION
Avatar of Ejgil Hedegaard
Ejgil Hedegaard
Flag of Denmark 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
Avatar of jana

ASKER

Thank you!