Results 1 to 4 of 4

Sorting mixed content.

Threaded View

  1. #1
    Registered User
    Join Date
    01-20-2013
    Location
    Massachusetts, USA
    MS-Off Ver
    Excel 2003
    Posts
    48

    Sorting mixed content.

    I have a worksheet with a row of mixed cells near the top.
    By "mixed", I mean some cells have only numeric data (numeric-cells) and some have only words (word-cells).

    GOAL: I want to sort the columns to the following order:
    First all the columns with only numeric-cells in the mixed row, with those columns sorted in DESCENDING numeric order of the numeric-cells in the mixed row; followed by the columns with only word-cells in the mixed row sorted by ASCENDING alphabetic order.

    So far all I have been able to accomplish is:

    First all the columns with only numeric-cells in the mixed row, with those columns sorted in ASCENDING numeric order of the numeric-cells in the mixed row; followed by the columns with only word-cells in the mixed row sorted by ASCENDING alphabetic order. This was accomplished by a simple sort using ASCENDING order on the mixed row.

    OR

    First all the columns with only word-cells in the mixed row, with those columns sorted in DESCENDING alphabetic order of the word-cells in the mixed row; followed by the columns with only numeric-cells in the mixed row sorted by DESCENDING numeric order. This was accomplished by a simple sort using DESCENDING order on the mixed row.

    This may sound as confusing to you as it does to me, so I have attached an example file showing hypothetical Input Data and the Desired Result.

    I did the example file in multiple steps, but that's too painful in the general case where calculations determine what is in which cell in the mixed row. All data are calculated, even the word-cell data AND so dependent on other data, and the columns in the mixed row that are word-cells and those that are numeric cells don't remain the same.

    Eventually I'd like to do this with a macro, so if VBA has some power to do this that EXCEL commands don't, then that's fine.

    I could probably live with the final result as numeric-cell columns sorted in DESCENDING order followed by word-cell columns sorted in DESCENDING order, but I haven't even been able to accomplish that AND it's not quite the goal.

    Thanks in advance for any help you can give,
    metsci
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Sorting mixed data cells
    By JorisDDS in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-19-2014, 05:44 PM
  2. Replies: 11
    Last Post: 02-11-2013, 08:10 AM
  3. Replies: 4
    Last Post: 08-25-2012, 07:49 AM
  4. Sorting mixed numeric values
    By cellophane in forum Excel General
    Replies: 6
    Last Post: 05-31-2012, 07:35 AM
  5. ZeroPadding Mixed Number, Text, Number Content in Cell
    By Sbubendorf in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-18-2008, 05:52 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