+ Reply to Thread
Results 1 to 4 of 4

vlookup when value/text is not in left-most column

  1. #1
    Registered User
    Join Date
    11-12-2008
    Location
    melbourne
    Posts
    9

    vlookup when value/text is not in left-most column

    Hi, i have spent a day thinking about this, haven't found a solution.

    I have a list of possible text values (cells B5:B223) and want to find if any of these values occur in a table_array (cells C5:H223) which has plenty of empty cells. My understanding is that vlookup will search the left-most column (C), but what if some values don't appear in column C but appear for the first time in column D or H?

    My goal is to count the number of entries from column B that have at least one occurrence in the table_array.

    This is what i have so far:

    =IF(ISERROR(VLOOKUP(B5,$C$5:$H$223,1,FALSE))," ",VLOOKUP(B5,$C$5:$H$223,1,FALSE))

    Any help greatly welcomed.
    Last edited by NBVC; 11-12-2008 at 10:09 PM. Reason: added formula

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    vlookup when value/text is not in left-most column

    In your description, you mentioned that you want to COUNT the number of
    times the Col_B item occurs in the Col_C through Col_H range.

    if that's true...this column counts the occurrences of B5's contents
    in C5:H223
    Please Login or Register  to view this content.
    If you want to know if the B5 value occurs 1 or more times in that range
    Please Login or Register  to view this content.
    Either way...Copy the formula down as far as you need.

    Is that something you can work with?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Registered User
    Join Date
    11-12-2008
    Location
    melbourne
    Posts
    9
    It sure is! I was just reading about duplicates and had modified the formula suggested:

    =IF(ISBLANK(B5),"",IF(COUNTIF($B$5:$H$223,B5)=1,"",1))

    which gives me everything i need.

    Thanks.

  4. #4
    Registered User
    Join Date
    11-12-2008
    Location
    melbourne
    Posts
    9
    Another way i found, which will also display which entries appear in the table is to enter in column J

    {=IF(OR(B5=$C$5:$H$223),B5,0)}

    and copy down, and then

    {=SUM(ISTEXT(J5:J223)*1)}

    will give the number of entries.

+ 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