+ Reply to Thread
Results 1 to 8 of 8

order column based off another columns

  1. #1
    Forum Contributor
    Join Date
    12-03-2020
    Location
    australia
    MS-Off Ver
    365
    Posts
    108

    order column based off another columns

    Hi,

    I have raw data in column A where I would like to order it based off another column (namely C and D).

    I've solved a problem like this before using a combination of rank and concatenate of first and last name but I just can't seem to make it work this time.

    Ideally I'm looking for ordering the original column A.

    Thank you
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    03-17-2010
    Location
    karachi
    MS-Off Ver
    Excel 2003
    Posts
    113

    Re: order column based off another columns

    Check this file

    MOD EDIT (detail added):

    G2 =IF(A2<>"Dept A",LOOKUP(90000,SEARCH(C2&D2,$A$2:$A$9),$A$2:$A$9),"Dept A")

    G3 copied down =IF(A3<>"Dept A",LOOKUP(90000,SEARCH(TRIM(INDIRECT("C"&INT(ROWS($A$1:A2)/2)+1))&" "&TRIM(INDIRECT("D"&INT(ROWS($A$1:A2)/2)+1)),$A$2:$A$9),$A$2:$A$9),"Dept A")
    Attached Files Attached Files
    Last edited by AliGW; 05-03-2022 at 03:39 AM. Reason: Formulae added to post.

  3. #3
    Forum Contributor
    Join Date
    12-03-2020
    Location
    australia
    MS-Off Ver
    365
    Posts
    108

    Re: order column based off another columns

    Is it possible to order column A rather than apply some rule to another column?

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,675

    Re: order column based off another columns

    @sohaila

    Sorry for off-topic interjection:

    Although there is no official rule regarding this behavior, we request that wherever possible both the question AND the answer be provided in substantive detail here within the thread. An attached workbook is an excellent aid for posing a question and offering a solution, but solely doing that with no in thread explanation makes it difficult for researchers to understand or consider the Q & A of this thread without downloading what may be a pointless doc to them, if they can do that at all. Doing that also hides the content from search engines so others may never benefit from this.

    I'm sure you understand, and we look forward to seeing you post your formulas/macros in your posts for the searching benefit of all.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,675

    Re: order column based off another columns

    Quote Originally Posted by bob112233 View Post
    Is it possible to order column A rather than apply some rule to another column?
    It uses the data you said was given - is that a problem?

  6. #6
    Forum Contributor
    Join Date
    12-03-2020
    Location
    australia
    MS-Off Ver
    365
    Posts
    108

    Re: order column based off another columns

    Yes, however last time i worked on this problem I remember I was able to create a rank column where I ordered my unordered list from rather than create a new column with my ordered list. I hope this makes sense. I will post up my excel file soon.

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,675

    Re: order column based off another columns

    Do we take it that you are happy with a helper column?

    You did explicitly say:

    I have raw data in column A where I would like to order it based off another column (namely C and D).
    and have now apparently changed your mind ...

  8. #8
    Forum Contributor
    Join Date
    12-03-2020
    Location
    australia
    MS-Off Ver
    365
    Posts
    108

    Re: order column based off another columns

    I mentioned "Ideally I'm looking for (to) ordering the original column A.". Maybe I wasn't explicit that I wanted to re-arrange column A only and not create a new column with the data. Nevertheless, I'm happy to settle with what is provided

+ 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. Insert Columns based on a list and then sort those columns in order based on list
    By hlkrawick in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-19-2022, 12:49 PM
  2. Order two columns based off two other columns order
    By bob112233 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-22-2021, 05:46 AM
  3. Replies: 7
    Last Post: 04-23-2014, 10:45 AM
  4. [SOLVED] Quantity in column D based on order amount of times the order no appears
    By djfscouse in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-19-2013, 06:48 PM
  5. How to order columns based on maximum value in each column?
    By guilhermepc in forum Excel General
    Replies: 0
    Last Post: 01-16-2012, 08:14 PM
  6. how to re-arrange columns based on a specified order
    By 2seas in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-05-2012, 10:06 AM
  7. Replies: 3
    Last Post: 06-16-2010, 04:23 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