+ Reply to Thread
Results 1 to 5 of 5

Sorting data to a completely different look (from a table to 3 columns)

  1. #1
    Registered User
    Join Date
    01-23-2013
    Location
    phoenix, arizona
    MS-Off Ver
    Excel 2012
    Posts
    71

    Sorting data to a completely different look (from a table to 3 columns)

    I have a file where I have to rearrange a fairly large table (a few hundred thousand cells, many of which are blank) into 3 columns. The attached image shows the before on the left and the after on the right (in another worksheet). Basically, the top row is account numbers, left column is items, and the numbers are prices. What I have in VBA is For loops using SpecialCells(xlCellTypeConstants).Count and lots of copying and pasting.

    It works, but I imagine there is a more elegant solution. Any thoughts? Very much appreciated! Please let me know if this doesn't make sense.

    Capture.PNG

  2. #2
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Sorting data to a completely different look (from a table to 3 columns)

    Can you attach the excel file to save clics to prepare the sample
    - Battle without fear gives no glory - Just try

  3. #3
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,517

    Re: Sorting data to a completely different look (from a table to 3 columns)

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    01-23-2013
    Location
    phoenix, arizona
    MS-Off Ver
    Excel 2012
    Posts
    71

    Re: Sorting data to a completely different look (from a table to 3 columns)

    That's the file. It deletes the 2nd column when it finishes copying and pasting. Makes it easy on me. I add the X's on Sheet2 so I can freely use End(xldown).

    Pretty sure I don't understand jindon's solution but I'll play with it. Looks much nicer than mine.

    Thank you!

    123.xlsm

  5. #5
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,066

    Re: Sorting data to a completely different look (from a table to 3 columns)

    Try
    Please Login or Register  to view this content.
    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. Replies: 0
    Last Post: 02-24-2014, 11:27 AM
  2. Table Sorting When Multiple Columns Contain the Same Type of Data
    By blackholeinacan in forum Excel General
    Replies: 5
    Last Post: 03-09-2011, 12:20 PM
  3. Excel 2007 : Custom sort not sorting completely
    By Sashabaz in forum Excel General
    Replies: 3
    Last Post: 07-10-2009, 11:49 AM
  4. sorting columns in a table
    By -Brian-H- in forum Excel General
    Replies: 3
    Last Post: 09-13-2008, 03:02 PM
  5. [SOLVED] Colors of columns after sorting data in the supporting table
    By Booger_Boy in forum Excel Charting & Pivots
    Replies: 6
    Last Post: 01-24-2005, 12:06 PM

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