+ Reply to Thread
Results 1 to 4 of 4

Lookup/Index + Re-order

  1. #1
    Forum Contributor
    Join Date
    08-16-2012
    Location
    Sefton
    MS-Off Ver
    MS Office 365 ProPlus
    Posts
    131

    Lookup/Index + Re-order

    Ok this is going to seem a little pointless, but it's part of a larger document which I can't share - mainly because i'm trying to rebuild it and it doesn't fully exist at the moment.
    Example.xlsx

    In the attached example you'll see two identical tables, one with data and one without - where I only reference one table assume the corresponding location on the other will have the same rules applied.
    What I want is for the data from the second table to appear in the first but in order by the first column (AE:AF/A:B). I know there's the simple sort and filter functions, but in the final document the client will not have the ability to use them.
    The data in table 2 is extracted from a 3rd party source, and the majority of the time it comes through out of order - so in the final document table 2 will be in the background and table 1 will be the table that the client sees.

    I've tried to fill out the table as if it were a real one - however there are very few occasions where all 24 rows are used; it's usually between 4 and 10.
    There may also be the odd occurrence where a value in column AE:AF is missed (i.e. you could have 1-4, missing 5, and have 6-8) In these circumstances I would require the missing value(s) to remain missing and not leave a space in the table.

    Columns A:B, C, AA:AC are all number values
    Columns J:Y will be either Y or N
    For Columns D,E,F only one of the 3 cells on the same row will have a Y at any one time - the same applies to G,H,I (there will be no Ns)

    Any questions let me know, as this is a work project i'll probably only respond during work hours.
    Thanks in advance.

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Lookup/Index + Re-order

    Select all of your table A2:AC25
    Paste this into the formula bar and press enter.


    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Or run this Macro,

    Please Login or Register  to view this content.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Forum Contributor
    Join Date
    08-16-2012
    Location
    Sefton
    MS-Off Ver
    MS Office 365 ProPlus
    Posts
    131

    Re: Lookup/Index + Re-order

    Nearly, but not quite.

    Either method leaves a row of #N/A if there is a missing/non-existant value in the first column. As I stated above this is rare but it does happen, and I need to make it so that the missing value is still missing but not leave values in the table. For example if we had 1,2,3,4,5 but value 3 did not exist, I would want the table to list them as;
    1
    2
    4
    5

    Also if I use the Macro method, iI get a table full of 0s where there was a blank box, and I can't have 0s in the Y/N boxes or the document will not validate.
    I'm trying to reduce the amount of work that's required by the client to complete the document.

  4. #4
    Forum Contributor
    Join Date
    08-16-2012
    Location
    Sefton
    MS-Off Ver
    MS Office 365 ProPlus
    Posts
    131

    Re: Lookup/Index + Re-order

    I've ended up with this;
    {=IF(IFERROR(INDEX($A$3:$Z$26,SMALL(IF($A$3:$A$26<>"",ROW($A$3:$A$26)-ROW($A$3)+1),ROWS(AE$3:AE3)),COLUMNS($AE3:AE3)),"")=0,"",IFERROR(INDEX($A$3:$Z$26,SMALL(IF($A$3:$A$26<>"",ROW($A$3:$A$26)-ROW($A$3)+1),ROWS(AE$3:AE3)),COLUMNS($AE3:AE3)),""))}
    it removes any blank rows and prevents and blank cells in the visible cells from showing as errors.

+ 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. Replies: 3
    Last Post: 06-17-2013, 12:37 PM
  2. Replies: 2
    Last Post: 05-19-2013, 08:46 AM
  3. Match/Index/Lookup - Searching From Bottom to Top (A reverse lookup maybe)
    By Neutralizer in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-02-2013, 03:55 AM
  4. Replies: 7
    Last Post: 06-19-2011, 12:51 PM
  5. Index Order For Controls
    By Excellant in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-10-2011, 04:02 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