+ Reply to Thread
Results 1 to 8 of 8

reg. sorting of to items and their related fields

  1. #1
    Registered User
    Join Date
    07-18-2011
    Location
    india
    MS-Off Ver
    Excel 2010
    Posts
    4

    reg. sorting of to items and their related fields

    dear all,
    i m attaching an excel file.column A and B are related.column C and D are related.the entries in column A and C are same but not in order.now i want to sort so that entry in cell A=cell C and the related entry in cell in B,D .
    Attached Files Attached Files

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: reg. sorting of to items and their related fields

    There is only one value common to both columns
    UPWMTR2004119606
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    07-18-2011
    Location
    india
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: reg. sorting of to items and their related fields

    sorry martindwilson,i m attaching another file.
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor
    Join Date
    05-23-2011
    Location
    Lahore PK
    MS-Off Ver
    Excel 2007, 2013
    Posts
    627

    Re: reg. sorting of to items and their related fields

    Hi xpushkar

    find the attatched file with value corrosponding to the column A&B from C&D are shown in G&H
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    07-18-2011
    Location
    india
    MS-Off Ver
    Excel 2010
    Posts
    4

    Question Re: reg. sorting of to items and their related fields

    sir,
    i m attaching one more file for this purpose.
    Attached Files Attached Files

  6. #6
    Valued Forum Contributor
    Join Date
    05-23-2011
    Location
    Lahore PK
    MS-Off Ver
    Excel 2007, 2013
    Posts
    627

    Re: reg. sorting of to items and their related fields

    Hi xpushkar

    there is space before the text in column C. Use this formula in Cell G2

    =IFERROR(VLOOKUP($A2,INDEX(TRIM($C$2:$D$19835),0),COLUMN(A$1),0),"")

    any paste on cell range G2:H19459

    in other case remove the spaces from column C. for this purpose select column c and use Ctrl+H

    after removing spaces use in G2 and apply on range G2:H19459

    =IFERROR(VLOOKUP($A2,$C$2:$D$19835,COLUMN(A$1),0),"")

  7. #7
    Registered User
    Join Date
    07-18-2011
    Location
    india
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: reg. sorting of to items and their related fields

    thanks Azam ji,
    its working very greatly.
    you don't know you have saved my full day work in 5 mins.
    if possible tell me the logic pls.
    thanks once again dear.
    Last edited by xpushkar; 07-22-2011 at 04:56 AM.

  8. #8
    Valued Forum Contributor
    Join Date
    05-23-2011
    Location
    Lahore PK
    MS-Off Ver
    Excel 2007, 2013
    Posts
    627

    Re: reg. sorting of to items and their related fields

    Hi xpushkar

    as i wrote earlier there are spaces before text in column C, the trim function is removing these spaces. so these become equal to text in column A. the index is convrting the range in trim function into a list and vlookpu is picking the match vale from that list.

    Use the evaluate formula function from the formula tab for more understanding.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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