+ Reply to Thread
Results 1 to 3 of 3

Left Vlookup on Certain Cell Values Only

  1. #1
    Registered User
    Join Date
    09-12-2016
    Location
    England, UK
    MS-Off Ver
    MS 365
    Posts
    59

    Left Vlookup on Certain Cell Values Only

    Hi all,

    I am trying to produce a left index match formula that will produce a list of sites that are live only.

    As per the attached spreadsheet, I am trying to produce a list like the one on the query tab, from the list in the database. Where each site is live, I need it to bring out the preceeding Number/Letter combo. In this example, I need it to bring out all those except for site 4, which is 'dead'

    I hope someone can help. Thank you in advance!

    P.S. I only realise now that I have posted this in the wrong section of the Forum, it should have been under formulas. I don't know how to change it, sorry!
    Attached Files Attached Files
    Last edited by Ollie7957; 08-17-2017 at 04:16 AM.

  2. #2
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Left Vlookup on Certain Cell Values Only

    You can use an array formula such as this, in A1 and copy down

    =IF(ROWS(A$1:A1)<=COUNTIF(Database!$C$1:$C$25,$B$1),INDEX(Database!$A$1:$A$25,SMALL(IF(Database!$C$1:$C$25=$B$1,ROW($A$1:$A$25)-ROW($A$1)+1),ROW())),"")

    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.

  3. #3
    Registered User
    Join Date
    09-12-2016
    Location
    England, UK
    MS-Off Ver
    MS 365
    Posts
    59

    Re: Left Vlookup on Certain Cell Values Only

    Thank you StephenR. worked brilliantly.

+ 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. macro for efficient vlookup with multiple lookup values in the columns to the left
    By ammartino44 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-16-2015, 03:51 PM
  2. Mix of non-empty cell range search & left vlookup
    By wouZa in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-22-2013, 02:47 PM
  3. [SOLVED] Copy and paste values if cell to the left is filled
    By skip2mylew in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-04-2013, 08:54 PM
  4. Vlookup only until the cell on the left is filled
    By movielux in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-13-2012, 07:36 AM
  5. Macro to move all values to left if the cell is empty
    By Blake 7 in forum Excel General
    Replies: 6
    Last Post: 05-05-2011, 06:28 AM
  6. Replies: 2
    Last Post: 03-31-2011, 11:16 AM
  7. Can Vlookup check a cell to the left?
    By koala in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 09-06-2005, 03:05 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