• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Macro to Transpose Data

aks_npti

New Member
Hello All,

I have data for around 1000 employees arranged horizontally which needs to be transposed vertically to update the database.

There are around 60 columns of data for each employee that need to be transposed. I am attaching a sample excel with this thread.

Any help will be highly appreciated!!!!

Regards,
AKS
 

Attachments

  • Query_Transpose.xlsx
    12.2 KB · Views: 2
Hi Hui ,

Thanks for your reply however I think I didn't explained the scenario correctly.

Let me try again :

I have to transpose the WT and associated amount with the employee code. There are 1000+ employees data needs to be transposed. Copying each row and transposing will take lot of time. Hence I thought if there is any macor / formula which can come to rescue me.

Regards,
AKS
 
As per @Hui has suggested you are not copying one row at a time but all in one copy/paste(transpose). B1 through to BL10
 

Attachments

  • Query_Transpose.xlsx
    17.9 KB · Views: 2
Thanks for the reply...

But this is not what my output looks like. I have updated the attached spreadsheet with output example. One column for emp. id , second column for wagetype & third column for the amount for the corresponding employee id & wagetype.

Sorry for confusing both of you!!!

Regards,
AKS
 

Attachments

  • Query_Transpose.xlsx
    19.2 KB · Views: 2
A13: =OFFSET($A$1,INT((ROW()-12.1)/(COUNTA($1:$1)-1))+1,)
B13: =OFFSET($A$1,,MOD(ROW()-13,(COUNTA($1:$1)-1))+1)
C13: =OFFSET($A$1,INT((ROW()-12.1)/(COUNTA($1:$1)-1))+1,MOD(ROW()-13,(COUNTA($1:$1)-1))+1)

Copy the 3 cells down as far as you need

or see attached file:
 

Attachments

  • Query_Transpose.xlsx
    30.4 KB · Views: 2
Back
Top