+ Reply to Thread
Results 1 to 5 of 5

Count items not included in a data validation range sourced from named range

  1. #1
    Forum Contributor
    Join Date
    10-08-2013
    Location
    London
    MS-Off Ver
    365
    Posts
    136

    Count items not included in a data validation range sourced from named range

    Hi All,

    How to phrase this!? I'm trying to find a formula that will count the number of items not included in a data validation range from another named range when the validation list is sorced from a seperate named range that has other entries not in the first named range.

    The specific workbook is attached.

    In this workbook, sheet 'Staff Data' has three named ranges - StaffList, Management and ValidationList. ValidationList is the combination of StaffList & Management and is literally the validation source for the staff columns on the sheet named 'Schedule'.

    The requirement:
    Cell D3 = Number of staff in range ("D5:D52") that have not been selected from StaffList.
    Cell B2 = The total number of staff in StaffList (already there).

    I need to exclude names selected from the Management named range that have been used in range ("D5:D52") as they are not considered regular staff but at times are added to the Schedule. There is never an issue of the same name being on either StaffList or Management as surnames are normally included but have been removed here to keep my staff anonymous.

    I will need to be able to apply the formula to columns F, H, J, L, N & P and to additional sheets in the workbook.

    Many thanks in advance for any assistance.

    Regards,
    Attached Files Attached Files
    Dave C

  2. #2
    Forum Expert
    Join Date
    06-26-2010
    Location
    Austin, TX
    MS-Off Ver
    Excel 2010
    Posts
    1,673

    Re: Count items not included in a data validation range sourced from named range

    I think this is what you want:
    =$B$2-SUMPRODUCT(COUNTIF(D5:D52,StaffList))

    Enter as an array formula (hit Ctrl-Shift-Enter instead of just Enter when inputting the formula).
    Pauley
    --------
    If I helped with your issue, I'd appreciate a rep bump (hit the '*' icon to the bottom left of this post).

  3. #3
    Forum Contributor
    Join Date
    10-08-2013
    Location
    London
    MS-Off Ver
    365
    Posts
    136

    Wink Re: Count items not included in a data validation range sourced from named range

    Hi Pauleyb,

    Thanks for the response but your formula does not take into consideration duplicates. It counts names that appear in the validation range more than once where my goal is to have only the number of names not yet used. I have attached an example of what I'm trying to achieve.

    In the attached work book, on the 'Schedule' sheet, validation for range ("D5:D52") is sourced from the named range called ValidationList in the 'Staff Data' sheet. On the 'Schedule' sheet, Cell D3 = Number of staff in range ("D5:D52") that have not been selected from the named range StaffList found in the 'Staff Data' sheet. I have set up two examples in the MONDAY and TUESDAY columns on the Schedule. The names not used from StaffList are recorded from row 54 down in each staff column, The count of these remaining names is what should be in D3 and F3 respectively.

    Hope this helps!

    Many thanks,
    Attached Files Attached Files
    Last edited by L plates; 02-10-2015 at 11:48 AM. Reason: Correct row number

  4. #4
    Forum Expert
    Join Date
    06-26-2010
    Location
    Austin, TX
    MS-Off Ver
    Excel 2010
    Posts
    1,673

    Re: Count items not included in a data validation range sourced from named range

    =$B$2-SUMPRODUCT(--(COUNTIF(D5:D52,StaffList)>0))

    This does not need to be entered as an array formula.

  5. #5
    Forum Contributor
    Join Date
    10-08-2013
    Location
    London
    MS-Off Ver
    365
    Posts
    136

    Re: Count items not included in a data validation range sourced from named range

    Hi Pauleyb,

    That works perfectly. So simple in the end! Thanks for your assistance.

    Regards,

+ 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: 2
    Last Post: 09-17-2014, 09:35 AM
  2. [SOLVED] Add Data Validation With Named Range
    By ezrizer in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-28-2014, 12:28 AM
  3. Using a named Range in Data Validation
    By Befuddled in forum Excel General
    Replies: 2
    Last Post: 02-11-2010, 11:07 PM
  4. Data Validation & Named Range
    By Dylan&Hayden in forum Excel General
    Replies: 5
    Last Post: 05-10-2008, 05:23 PM
  5. Replies: 1
    Last Post: 06-24-2005, 12:21 AM

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