+ Reply to Thread
Results 1 to 6 of 6

Populating a column in order with an adjacent column

  1. #1
    Registered User
    Join Date
    05-27-2015
    Location
    london
    MS-Off Ver
    2003
    Posts
    22

    Populating a column in order with an adjacent column

    Hi,

    I know my way around Excel a bit but am stumped with this and dont really know where to start. On the attached picture I have shown data in column A, B, and C. The data in column A is fixed and I want to sort the data in column B and C so it matches column A eg:

    After pasteing the data in Column B and C, 1001 in B goes from cell B4 along with the value in C4 into position B2 and C2 respectively

    I want this to carry on down the sheet for around 200 items. If there is a gap (say 1020, 1021 then 1024) then the formula needs to skip those rows to keep the number in column A and B the same.

    Is this actually possible??

    Thanks for any help.Excel.jpg

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,065

    Re: Populating a column in order with an adjacent column

    If you insert two columns between A and B then

    in B2
    =IFERROR(VLOOKUP(A2,D$2:E$8,1,0),"")

    in C2
    =IFERROR(VLOOKUP(A2,D$2:E$8,2,0),"")

    and copy the formulas down columns B and C
    will return the values without the need for sorting and also solving your gap problem.
    Last edited by Special-K; 05-27-2015 at 11:43 AM.
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Registered User
    Join Date
    05-27-2015
    Location
    london
    MS-Off Ver
    2003
    Posts
    22
    Quote Originally Posted by Special-K View Post
    If you insert two columns between A and B then

    in B2
    =IFERROR(VLOOKUP(A2,D$2:E$8,1,0),"")

    in C2
    =IFERROR(VLOOKUP(A2,D$2:E$8,2,0),"")

    and copy the formulas down columns B and C
    will return the values without the need for sorting and also solving your gap problem.

    This did not seem to work unless I am missing the obvious. Please attached image. Thanks for any advice. If I can get this to work it will revolutionise my barcode system.
    Attached Images Attached Images

  4. #4
    Registered User
    Join Date
    07-28-2007
    Posts
    35

    Re: Populating a column in order with an adjacent column

    try this, not pretty but functional
    haven't tested for duplicates
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    05-27-2015
    Location
    london
    MS-Off Ver
    2003
    Posts
    22
    Quote Originally Posted by paperbo View Post
    This did not seem to work unless I am missing the obvious. Please attached image. Thanks for any advice. If I can get this to work it will revolutionise my barcode system.
    Solved now

    Just removed the =iferror function and changed it.

    I've read up on the vlookup function and get it now.
    A blank query now shows as #N/A and the list continues correctly.

  6. #6
    Registered User
    Join Date
    05-27-2015
    Location
    london
    MS-Off Ver
    2003
    Posts
    22
    Quote Originally Posted by paperbo View Post
    Solved now

    Just removed the =iferror function and changed it.

    I've read up on the vlookup function and get it now.
    A blank query now shows as #N/A and the list continues correctly.
    image.jpg (4.81 MB)
    Attached Images Attached Images

+ 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. [SOLVED] How do I change row and column order while auto-populating to XLS from CSV?
    By dudeski in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-04-2014, 09:02 AM
  2. Replies: 1
    Last Post: 03-02-2013, 05:06 AM
  3. Replies: 5
    Last Post: 01-18-2012, 08:33 AM
  4. Script to check for duplicates in one column then alter adjacent column values
    By SebN in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-29-2010, 12:23 PM
  5. Replies: 6
    Last Post: 03-04-2006, 07:30 AM

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