+ Reply to Thread
Results 1 to 6 of 6

Matching List Formula Error

  1. #1
    Registered User
    Join Date
    10-20-2015
    Location
    Alabama
    MS-Off Ver
    Excel 2013
    Posts
    29

    Angry Matching List Formula Error

    I'm encountering a very frustrating problem with a formula I use for matching a value in another list. I use =IF(COUNTIF('[DifferentWorkbook.xlsx]Sheet1:Sheet5'!$A$4:$J$55,H3)>0,"YES","NO") . The formula works for one sheet but returns a #VALUE? error when selecting all sheets in a different workbook. Why is this and how can I fix it?

    Regards

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Matching List Formula Error

    Those 3D references (Sheet1:Sheet5) only work in simple functions like SUM.
    But not in countif

    I'm afraid you'd likely have to do
    COUNTIF1+COUNTIF2+COUNTIF3+COUNTIF4 etc..


    Realistically, I'd recommend haing each countif in it's own cell.
    Something like
    A1: =COUNTIF('[DifferentWorkbook.xlsx]Sheet1'!$A$4:$J$55,H3)
    B1: =COUNTIF('[DifferentWorkbook.xlsx]Sheet2'!$A$4:$J$55,H3)
    C1: =COUNTIF('[DifferentWorkbook.xlsx]Sheet3'!$A$4:$J$55,H3)
    D1: =COUNTIF('[DifferentWorkbook.xlsx]Sheet4'!$A$4:$J$55,H3)
    etc..

    Then do
    =IF(SUM(A1:D1)>0,"YES","NO")

  3. #3
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Matching List Formula Error

    You cannot use COUNTIF in a multi-sheet range.

    https://support.office.com/en-us/art...rs=en-US&ad=US
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  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: Matching List Formula Error

    In addition, COUNTIF will only work when the source file is open.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  5. #5
    Registered User
    Join Date
    10-20-2015
    Location
    Alabama
    MS-Off Ver
    Excel 2013
    Posts
    29

    Re: Matching List Formula Error

    It seems like using COUNTIF is not worth using if the file needs to be open to show the returned value. How else could I go about checking one value against a list of values in another workbook?

  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: Matching List Formula Error

    You can use the SUMPRODUCT function but you can only reference a single sheet at a time.

    =SUMPRODUCT(--('[DifferentWorkbook.xlsx]Sheet1'!$A$4:$J$55=H3))

    The best way to write the formula is to have the source file open then type in this much:

    =SUMPRODUCT(--(

    Then use your mouse to point to the ranges in the source file. That way Excel will put the path in for you.

+ 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] Alter Matching Sub From matching two Ranges to matching one range and list
    By capson in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-14-2015, 10:48 PM
  2. Replies: 3
    Last Post: 11-03-2014, 04:23 PM
  3. [SOLVED] Formula for matching any part of a cell against a list in other worksheet
    By Nic812 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-24-2014, 02:11 PM
  4. Replies: 0
    Last Post: 01-09-2013, 11:44 AM
  5. Replies: 3
    Last Post: 07-20-2012, 09:52 AM
  6. Error trapping in a formula with Matching
    By markvdh in forum Excel General
    Replies: 8
    Last Post: 03-07-2011, 05:57 AM
  7. Validation List with Matching formula
    By elfiky in forum Excel General
    Replies: 0
    Last Post: 09-22-2010, 11:11 PM

Tags for this Thread

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