+ Reply to Thread
Results 1 to 10 of 10

How to automate transpose using formula or macros

  1. #1
    Registered User
    Join Date
    02-27-2011
    Location
    Kolkata, India
    MS-Off Ver
    Excel 2007
    Posts
    13

    Exclamation How to automate transpose using formula or macros

    Friends

    So I have this spreadsheet where there are thousands of sets of data in the first column consisting of name, address, phone, fax & email. All these data are grouped together. Kindly refer to the attached image & spreadsheet for better understanding

    All I want to do is transpose each set of data from the first column to their respective rows.

    Is there a way I could automate this through a formula or a macro.

    Please let me know...this will save me a lot of time and also money


    Many thanks in advance!
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by ethan2hunt; 10-03-2012 at 04:03 PM. Reason: added more details

  2. #2
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,551

    Re: How to automate transpose using formula or macros

    Give this a try

    Please Login or Register  to view this content.
    Last edited by mike7952; 10-03-2012 at 05:13 PM.
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

  3. #3
    Registered User
    Join Date
    02-27-2011
    Location
    Kolkata, India
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: How to automate transpose using formula or macros

    Hi Mike

    Thanks a lot for your response and for providing the code

    I tried running it but couldn't make it run properly.

    I have attached a sample seed of data from our actual sheet that we're trying to work on. On each set of data, you'll find that there's a year mentioned at the top of the set, we would want to have that removed as well.

    My desired output is the one that's shown in the first row of the sheet.

    I'd be very grateful If you could kindly show me how exactly to run the code on this sheet and also how it would look once the code is executed


    Many thanks again!
    Attached Files Attached Files
    Last edited by ethan2hunt; 10-04-2012 at 01:16 PM.

  4. #4
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,551

    Re: How to automate transpose using formula or macros

    Try this

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    02-27-2011
    Location
    Kolkata, India
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: How to automate transpose using formula or macros

    Thanks a TON Mike - worked like a charm

    Could you also please suggest a macro code for the sample sheet attached

    This would be similar to the previous one, but here the rows from address to fax in Column B needs to be transposed to the corresponding rows

    I have done the first one manually for reference.

    I would be grateful if you could suggest a code for this too.

    I can't thank you enough for your kind assistance Mike - very much appreciated.


    Regards
    Attached Files Attached Files

  6. #6
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,551

    Re: How to automate transpose using formula or macros

    This should work

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    02-27-2011
    Location
    Kolkata, India
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: How to automate transpose using formula or macros

    Hi Mike

    I tried your code and it got very close. It started transposing the firm name as well, which is not needed.

    I just need to transpose the following fields:-

    Address:
    City/Prov:
    Phone:
    Fax:

    The firm name is already in its appropriate column, so we can leave it there.

    Find attached the output with your code and my desired output in the next tab in the same sheet


    Thanks a lot!
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    02-27-2011
    Location
    Kolkata, India
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: How to automate transpose using formula or macros

    On another note, I re-ran the code and found that it's duplicating the data of the first entry (CHERYL A. CANNING) on all the rows of the remaining data.

    Kindly check

  9. #9
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,551

    Re: How to automate transpose using formula or macros

    Sorry my bad, I was working on something else and just turned that up without really looking at it. Try this

    Please Login or Register  to view this content.

  10. #10
    Registered User
    Join Date
    02-27-2011
    Location
    Kolkata, India
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: How to automate transpose using formula or macros

    Hi Mike

    Thanks for the code.

    I will run this one later and get back to you on the outcome


    Many thanks!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1