+ Reply to Thread
Results 1 to 7 of 7

Help Transpose Data

  1. #1
    Registered User
    Join Date
    04-13-2013
    Location
    Calcutta
    MS-Off Ver
    Excel 2013
    Posts
    87

    Help Transpose Data

    Hello

    Please find a sample spreadsheet attached. I have data (Name, Address, Phone, Web) all in a single column but I want to have them transposed into their individual columns so that I can sort/ filter the data with those

    There are a few thousand sets of such data that I need transposed

    Kindly advise

    Many thanks
    Attached Files Attached Files

  2. #2
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,937

    Re: Help Transpose Data

    If you have list of cities in separate sheet then it will be done, why because some of the cities have more than 1 word and there is not column delimiter
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  3. #3
    Registered User
    Join Date
    04-13-2013
    Location
    Calcutta
    MS-Off Ver
    Excel 2013
    Posts
    87

    Re: Help Transpose Data

    Hi Siva

    Thanks for your reply. I understand that the previous sheet didn't have a delimiter before the city to help with the tranpose.

    Could you kindly look at the following spreadsheet and advise if it could be done with this one?

    Many thanks
    Attached Files Attached Files

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    18,847

    Re: Help Transpose Data

    This proposed solution uses formulas which start in the same row as the first line of data.
    The formula for column B is: =IF(AND(A2="",A3<>""),A3,"")
    The formula for column C is: =IF(B3<>"",A4,"")
    The formula for column D is: =IF(AND(B3<>"",A6<>""),A5,"")
    The formula for column E is: =IF(AND(B3<>"",D3<>""),LEFT(A6,SEARCH(",",A6)-1),IF(AND(B3<>"",D3=""),LEFT(A5,SEARCH(",",A5)-1),""))
    The formula for column F is: =IF(AND(B3<>"",D3<>""),MID(A6,SEARCH(",",A6)+2,2),IF(AND(B3<>"",D3=""),MID(A5,SEARCH(",",A5)+2,2),""))
    The formula for column G is: =IF(AND(B3<>"",D3<>""),VALUE(RIGHT(A6,5)),IF(AND(B3<>"",D3=""),VALUE(RIGHT(A5,5)),""))
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  5. #5
    Registered User
    Join Date
    04-13-2013
    Location
    Calcutta
    MS-Off Ver
    Excel 2013
    Posts
    87

    Re: Help Transpose Data

    Quote Originally Posted by JeteMc View Post
    Let us know if you have any questions.
    Thank you so much for the formula

    However, when working on the ZIP column, I am seeing some of the ZIP codes being stripped off to the last 1-2 digits

    Kindly refer to the attached spreadsheet to see what I mean

    Thanks once again for your help
    Attached Files Attached Files

  6. #6
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,408

    Re: Help Transpose Data

    You have a space at the end of some of the rows that contain the zip code - you should use the TRIM function to get rid of them, like this, amending JeteMc's last formula:

    The formula for column G is:
    =IF(AND(B3<>"",D3<>""),VALUE(RIGHT(TRIM(A6),5)),IF(AND(B3<>"",D3=""),VALUE(RIGHT(TRIM(A5),5)),""))

    Hope this helps.

    Pete

  7. #7
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,937

    Re: Help Transpose Data

    B3=IF(AND($A2="",$A3<>""),$A3,"")
    C3=IF(AND($A2="",$A3<>""),$A4,"")
    D3=IF(AND($A2="",$A3<>""),IF(INDEX(A3:A18,4)="","",$A5),"")
    E3=IF(AND($A2="",$A3<>""),TRIM(LEFT(IF(D3="",$A5,$A6),SEARCH(",",IF(D3="",$A5,$A6))-1)),"")
    F3=IF(AND($A2="",$A3<>""),TRIM(LEFT(SUBSTITUTE(TRIM(MID(IF(D3="",$A5,$A6),SEARCH(",",IF(D3="",$A5,$A6))+1,256))," ",REPT(" ",20)),20)),"")
    G3=IF(AND($A2="",$A3<>""),TRIM(RIGHT(SUBSTITUTE(TRIM(MID(IF(D3="",$A5,$A6),SEARCH(",",IF(D3="",$A5,$A6))+1,256))," ",REPT(" ",20)),20)),"")
    tRY THIS AND COPY TOWARDS DOWN


    SEE ATTACHED FILE
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. transpose column to a range calculate and transpose to new table loop
    By moshro1 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-02-2015, 10:52 AM
  2. Replies: 7
    Last Post: 10-03-2014, 05:04 AM
  3. Transpose Data from Columns to Rows after each unique data point
    By lnagell in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-01-2014, 08:10 PM
  4. Transpose data to columns from rows keeping unique data together
    By aimeecrystalaid in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-09-2013, 12:23 AM
  5. Transpose horizontal data to vertical data with paste link
    By M.Devadhasan in forum Excel General
    Replies: 0
    Last Post: 07-07-2012, 01:01 PM
  6. [SOLVED] Transpose: How can I copy a list and transpose it but leaving 3 cells in between each item
    By cocolete in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-11-2012, 10:01 AM
  7. Replies: 2
    Last Post: 02-19-2007, 04:53 PM

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