+ Reply to Thread
Results 1 to 6 of 6

Counting cells that are found in a VLOOKUP

  1. #1
    Registered User
    Join Date
    06-06-2012
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    13

    Counting cells that are found in a VLOOKUP

    Excel 2007:

    I am trying to create a formula that will read text values in a range(name) and compare them to values in a lookup table. If the value is NOT found in the Lookup table, I want to count the number of occurrences.

    Any solutions?

    Thanks,
    Mike

  2. #2
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Counting cells that are found in a VLOOKUP

    =SUM(--(COUNTIF(F12:F19,H12:H20)=0))
    as an array formula (confirm with ctrl+shift+enter)

    As set up, it will return the number of cells in the range H12:H20 that are not contained in the range F12:F19.
    Last edited by ragulduy; 03-13-2014 at 11:53 AM.

  3. #3
    Registered User
    Join Date
    06-06-2012
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: Counting cells that are found in a VLOOKUP

    Thank you sir.

    The formula I entered is: =SUM(--(COUNTIF(CommentNames,RawJobs!P:P)=0))

    "RawJobs!P:P" is column of entries on a sheet that I want to check against the Range Name Table "CommentNames" to see if they are in this table and give me a count of any that don't match. To test, I have 5 entries in "RawJobs!P:P" that aren't in the table, but the result I get is 0.

    I'm unclear as what you mean by confirming the array by using Ctrl-Shift-Enter.

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Counting cells that are found in a VLOOKUP

    Try this...

    Data Range
    A
    B
    C
    D
    1
    -----
    -----
    -----
    -----
    2
    Data1
    Data1
    5
    3
    Data2
    Data2
    4
    Data3
    Data4
    5
    Data4
    Data8
    6
    Data5
    Data15
    7
    Data6
    8
    Data7
    9
    Data8
    10
    Data9


    This formula entered in D2:

    =SUMPRODUCT(--ISNA(MATCH(A2:A10,C2:C6,0)))

    Do not use the entire column A as a range reference. Use a smaller specific range.

    As is that formula will count empty cells in column A. If you do not want the empty cells counted use this version:

    =SUMPRODUCT(--(A2:A10<>""),--ISNA(MATCH(A2:A10,C2:C6,0)))
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  5. #5
    Registered User
    Join Date
    06-06-2012
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: Counting cells that are found in a VLOOKUP

    Thank you both. They both worked once I got one of the range cells corrected.

    I really appreciate the help I have gotten on this site.

    Cheers,
    Mike

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Counting cells that are found in a VLOOKUP

    You're welcome. We appreciate the feedback!


    If your question has been solved please mark the thread as being solved.

    In the menu bar above the very first post select Thread Tools, then select Mark this thread as solved.

+ 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: 6
    Last Post: 05-30-2013, 02:09 AM
  2. Pull in the cells Format that is found using a Vlookup formula
    By Macster56 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-13-2012, 08:54 AM
  3. Compare and update cells found with VLOOKUP?
    By Mjones in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-05-2012, 05:11 PM
  4. [SOLVED] VLOOKUP - value not found HELP
    By tleilax in forum Excel General
    Replies: 3
    Last Post: 04-05-2012, 06:08 AM
  5. Counting columns until certain data is found
    By Quickstepbr in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-18-2008, 06:03 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