+ Reply to Thread
Results 1 to 7 of 7

How to sort multiple columns without cutting and pasting into one long string first

  1. #1
    Registered User
    Join Date
    08-26-2018
    Location
    Louisville, ky
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    3

    How to sort multiple columns without cutting and pasting into one long string first

    I have four (4) column headings of data that I sort by "Item" then by "Date"
    These columns, together as a whole, only use about a 1/3 of a sheet of paper but the string is quite long. Seven pages when printed. (8 1/2 x 11 portrait)
    I've been cutting and pasting the string into three blocks of data to maximize the sheet of paper and conserve on paper when printing.

    Is there a way to sort the two columns, as mentioned, while the data is spread out across the sheet so as to avoid having to cut and paste. In essence, selecting 6 columns but the sorting process would be accurate as a whole. Listing all items by product number and in oldest date order. I hope this makes sense.

  2. #2
    Forum Contributor
    Join Date
    07-01-2018
    Location
    Adelaide, South Australia
    MS-Off Ver
    Office 365, & Excel 2016 on windows 10, & 14.7 for mac, & Excel 2015 for mac
    Posts
    173

    Re: How to sort multiple columns without cutting and pasting into one long string first

    This is rather vague. I have no idea what kind of structures/delimiters/parameters you are working with.
    Could you post an example please?

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: How to sort multiple columns without cutting and pasting into one long string first

    Hi, welcome to the forum

    As suggested, To best describe or illustrate your problem you would be better off attaching a dummy workbook. The workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Registered User
    Join Date
    08-26-2018
    Location
    Louisville, ky
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    3

    Re: How to sort multiple columns without cutting and pasting into one long string first

    Attached is the spreadsheet I'm using. As you can see I have three blocks of data (DATE, ITEM, LOC) spanning a letter size sheet of paper.
    I need to have all data sorted by ITEM, then by DATE. I am currently taking all data and placing it in one long string, (4 columns wide) to sort as needed.
    Once sorted I cut and paste the data back into 3 blocks of data across the sheet before printing.
    I'm hoping there is a way to sort the data without having to cut and paste each time we update the file which is daily.
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    07-01-2018
    Location
    Adelaide, South Australia
    MS-Off Ver
    Office 365, & Excel 2016 on windows 10, & 14.7 for mac, & Excel 2015 for mac
    Posts
    173

    Re: How to sort multiple columns without cutting and pasting into one long string first

    If you are happy to use a macro, this sub detects if your data is in 1 column or 3. Run the macro to get the data into one column, do your sort, then run the macro again to put it back into 3 columns

    Please Login or Register  to view this content.
    NB - I don't generally like use "Select" and but as I am unsure where your level is at, this seemed best.
    -Bare in mind that if you data is in slightly different locations, you'll need to edit the cell references

  6. #6
    Registered User
    Join Date
    08-26-2018
    Location
    Louisville, ky
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    3
    For the most part I'm only familiar with the basics of Excel..
    Suspected a macro may be my only hope. I have no experience with them but will give this a try.

    Thanks much!


    I just ran the macro. WHOA. That is awesome and I am so, so thankful for your help on this truk2. Very pleased.
    Last edited by hdbikerchick; 09-03-2018 at 12:14 PM.

  7. #7
    Forum Contributor
    Join Date
    07-01-2018
    Location
    Adelaide, South Australia
    MS-Off Ver
    Office 365, & Excel 2016 on windows 10, & 14.7 for mac, & Excel 2015 for mac
    Posts
    173

    Re: How to sort multiple columns without cutting and pasting into one long string first

    Quote Originally Posted by hdbikerchick View Post
    For the most part I'm only familiar with the basics of Excel..
    Suspected a macro may be my only hope. I have no experience with them but will give this a try.

    Thanks much!


    I just ran the macro. WHOA. That is awesome and I am so, so thankful for your help on this truk2. Very pleased.
    I'm glad I could help.

    Would you mind clicking "Add reputation"? I'm new, and am eager to build up some stats.

+ 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. Cutting and Pasting
    By WAAZUPEE in forum Excel General
    Replies: 1
    Last Post: 05-01-2018, 04:29 PM
  2. Sort a long list of string
    By calvinfoo in forum Excel General
    Replies: 3
    Last Post: 05-12-2015, 02:11 PM
  3. Cutting & Pasting Macro
    By scruz9 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-16-2014, 12:39 PM
  4. Cutting and pasting multiple cells
    By NicholasMango in forum Excel General
    Replies: 1
    Last Post: 04-24-2013, 11:28 PM
  5. cutting and pasting in VBA
    By ben5496 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-27-2011, 05:07 PM
  6. Formats when cutting and pasting
    By Kayle Z in forum Excel General
    Replies: 1
    Last Post: 02-09-2006, 12:00 AM
  7. Setting up some sort of cutting and pasting loop
    By Trickster in forum Excel Formulas & Functions
    Replies: 40
    Last Post: 09-06-2005, 03:05 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