+ Reply to Thread
Results 1 to 6 of 6

Reordering Data

  1. #1
    Registered User
    Join Date
    01-08-2015
    Location
    Los Angeles
    MS-Off Ver
    2010
    Posts
    2

    Reordering Data

    Hello,
    I have a column that is a list of countries and another adjacent column with tax numbers for each country. I have another column which is the same list of countries but in a different order.
    I want to automatically add the tax numbers to this reordered list of countries in the correct order. Can someone please explain how to do this? I tried vlookup, but it doesn't look like this is the right command.

    Thanks very much.
    Alex

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Reordering Data

    Hi akboche,

    Welcome to the Forum!

    I would use VBA with a Dictionary.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Reordering Data

    If the countries' names are spelled the same then

    vLLOKUP seems the right command. send a sample and it will be solved!1

  4. #4
    Registered User
    Join Date
    01-08-2015
    Location
    Los Angeles
    MS-Off Ver
    2010
    Posts
    2

    Re: Reordering Data

    Here is the sample
    thanks

    sample.xlsx

  5. #5
    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,938

    Re: Reordering Data

    Try this, copied down...
    =VLOOKUP(D1,$A$1:$B$29,2,0)
    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

  6. #6
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Reordering Data

    Here's a VBA Dictionary solution:

    Please Login or Register  to view this content.
    Directions for running the routine(s) just supplied

    If you haven't used macros before you'll need to go to your options - trust center -trust center settings - macro settings
    , the second option down (disable all macros with notification)

    Then - Copy the code to the clipboard

    Open your Workbook

    Press ALT + F11 to open the Visual Basic Editor.

    Select "Module" from the Insert menu

    Type "Option Explicit" then paste the code under it

    With the cursor between Sub and End Sub press F5 (F8 to Single Step)

    OR

    Press ALT + Q to close the code window.

    Press ALT + F8 then double click on the macro name

+ 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. Reordering Rows
    By VelvetRevolver84 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-01-2013, 12:15 AM
  2. pie chart of only the positive values in a table without reordering the data
    By lgjmac in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-23-2013, 10:01 PM
  3. Parsing / Reordering Data for Easy Duplicate Finding?
    By bikeking8 in forum Excel General
    Replies: 2
    Last Post: 04-27-2013, 07:39 AM
  4. [SOLVED] [How To] Reordering Headers and Data Of A Workbook To Match Another Workbook
    By regularcat in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-17-2013, 04:05 PM
  5. Reordering a list
    By Buffy500 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-20-2009, 05:38 AM

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