Link to home
Start Free TrialLog in
Avatar of Fridaybird
Fridaybird

asked on

How to Transpose data in Excel through formula or code?

I have my data in the following format in one column:

AMERICAS\A.GIRARD
Alejandro
Girard
No

AMERICAS\A.M.LAWRENCE
Alex
Lawrence
Yes

AMERICAS\A.MATVIENK
Alexander
Matvienk
No

AMERICAS\AARON.FUHRR
Aaron
Fuhrr
No

Please note that there is a gap of one row between each set of Data of 4 lines.
I need this data to be organized in the following manner, either on same sheet or the new sheet does not matter:

AMERICAS\A.GIRARD       Alejandro       Girard       No
AMERICAS\A.M.LAWRENCE       Alex       Lawrence       Yes
AMERICAS\A.MATVIENK      Alexander      Matvienko      No
AMERICAS\AARON.FUHRR       Aaron       Fuhrr       No

Please help.

Regards

Imran
Avatar of Phillip Burton
Phillip Burton

Assuming the data starts in Sheet1, and you are putting the new table starting in cell A1 of another sheet:

=OFFSET(Sheet1!$A$1,COLUMN(A1)-1 + (ROW(A1)-1)*5,0)

Open in new window

A bit more useful - assuming the data starts in Sheet1$A$1, and you are putting the new table starting in cell $a$1 of any sheet:

=OFFSET(Sheet1!$A$1,(COLUMN(A1)-COLUMN($A$1)) + (ROW(A1)-ROW($A$1))*5,0)

Change Sheet1!$A$1 to the correct location of the original data, and change the other two $A$1 to be the starting location of the new column. Both of them need to have the two dollar signs.

Copy this across three columns and down three rows for the full effect.
Avatar of Fridaybird

ASKER

did not work, it return some 'No' and '0's' in the same column. can you please review?
Please see the attached spreadsheet.
Transpose.xlsx
not checked the other attachment, but find my attempt attached, just copy your data in a drag the cells in Sheet2 down.
helps if I press upload!
Book1.xlsx
Apparently it works but, after few rows it wrecks order of the data, not sure if something wrong in the formation of my data or code stops working. can you please take look on the attached spreadsheet?

Many Thanks

Imran
TestTranspose.xlsx
It's because you have two line gaps in rows 75 and 76.
Same around row 491
I am an idiat :( Apology.
I've requested that this question be closed as follows:

Accepted answer: 0 points for Fridaybird's comment #a40370507
Assisted answer: 250 points for Phillip Burton's comment #a40370425
Assisted answer: 250 points for Phillip Burton's comment #a40370433

for the following reason:

Very quick and accurate response. Both Experts came up with wealth knowledge and courtesy. My salutes to both Philip Burton and Topper88.
ASKER CERTIFIED SOLUTION
Avatar of Pratik Makwana
Pratik Makwana
Flag of India 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
Thanks, issue was resolved