+ Reply to Thread
Results 1 to 8 of 8

Using Countifs in Data Validation

  1. #1
    Registered User
    Join Date
    05-08-2020
    Location
    Seattle
    MS-Off Ver
    Office 365
    Posts
    7

    Question Using Countifs in Data Validation

    Hi Gurus!

    I am having trouble getting COUNTIFS to work in my data validation. I want a dropdown to be contained by a match. My initial validation works fine:

    =OFFSET(Activity,MATCH(E34,Activity,0),1,COUNTIF(Activity,E34),1)

    Then I want the dropdown list to only populate if the value on another table is 0. I tried to use the following with COUNTIFS but I get "The Source currently evaluates to an error"

    =OFFSET(Activity,MATCH(E34,Activity,0),1,COUNTIFS(Activity,E34,Available,"=0"),1)

    Any suggestions?

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Using Countifs in Data Validation

    Hard to say without seeing a WB showing the application, but try removing the "" from "=0"
    =OFFSET(Activity,MATCH(E34,Activity,0),1,COUNTIFS(Activity,E34,Available,0),1)

    If you still have a problem, follow the directions in the yellow banner at the top
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    05-08-2020
    Location
    Seattle
    MS-Off Ver
    Office 365
    Posts
    7

    Re: Using Countifs in Data Validation

    Sorry, 1st post. example attached
    Attached Files Attached Files

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Using Countifs in Data Validation

    1. Put this in ARRAY formula M2...
    =IFERROR(INDEX($J:$J,SMALL(IF(($I$2:$I$17=$B$2)*($K$2:$K$17<>""),ROW($I$2:$I$17)),ROWS($A$1:A1))),"")
    **Array formulas are not entered in the same way as 'standard' formulas. Instead of pressing just ENTER, you first hold down CTRL and SHIFT, and only then press ENTER. If you've done it correctly, you'll notice Excel puts curly brackets {} around the formula (though do not attempt to manually insert these yourself).
    Then copy down for about 20 rows

    2. change the DD in C2 to LIST
    3. Use this as teh formula there...
    =OFFSET($M$2,0,0,SUMPRODUCT(--(M:M<>"")),1)

    The list in col M will grow or shrink to match the 0's entered in K

    See attached as well
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    05-08-2020
    Location
    Seattle
    MS-Off Ver
    Office 365
    Posts
    7

    Re: Using Countifs in Data Validation

    Thanks for the help!

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Using Countifs in Data Validation

    Happy to help and thanks for the feedback

  7. #7
    Registered User
    Join Date
    05-07-2020
    Location
    india
    MS-Off Ver
    2013
    Posts
    1

    Re: Using Countifs in Data Validation

    Quote Originally Posted by FDibbins View Post
    Hard to say without seeing a WB showing the application, but try removing the "" from "=0"
    =OFFSET(Activity,MATCH(E34,Activity,0),1,COUNTIFS(Activity,E34,Available,0),1)

    If you still have a problem, follow the directions in the yellow banner at the top

    If in row A, I have restricted for duplicate entry in data validation "Custom' formula =COUNTIF($A$2:A10009,A11)=1 but I also want to restrict maximum character to 30 Please guide me

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Using Countifs in Data Validation

    Quote Originally Posted by deepak30 View Post
    If in row A, I have restricted for duplicate entry in data validation "Custom' formula =COUNTIF($A$2:A10009,A11)=1 but I also want to restrict maximum character to 30 Please guide me
    Administrative Note:

    Welcome to the forum.

    We are happy to help, however whilst you feel your request is similar to this thread, experience has shown that things soon get confusing when answers refer to particular cells/ranges/sheets which are unique to your post and not relevant to the original.

    Please see Forum Rule #4 about hijacking and start a new thread for your query.

    If you are not familiar with how to start a new thread see the FAQ: How to start a new thread

+ 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] CountifS for Column Reference, Row Reference and Data Validation Reference
    By pavanbhoyar in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-24-2018, 02:37 AM
  2. [SOLVED] Using COUNTIFS with Data Validation List
    By admirable in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-21-2018, 11:29 AM
  3. [SOLVED] Countifs Data validation cells not working
    By SHUTTEHFACE in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 09-04-2018, 05:58 PM
  4. Replies: 1
    Last Post: 01-14-2018, 11:04 AM
  5. [SOLVED] Data Validation + OFFSET + COUNTIFS
    By irmaosver in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-06-2014, 03:35 PM
  6. [SOLVED] Help using OFFSET, MATCH and COUNTIFS in Data Validation List
    By BeachRock in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-06-2013, 03:38 PM
  7. Replies: 0
    Last Post: 12-16-2011, 09:01 AM

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