+ Reply to Thread
Results 1 to 5 of 5

Data Validation – COUNTA for a list

Hybrid View

  1. #1
    Registered User
    Join Date
    04-20-2022
    Location
    USA
    MS-Off Ver
    OFFICE 365
    Posts
    6

    Data Validation – COUNTA for a list

    Hi everyone, I have a table of values and I'm trying to figure out how to use data validation to create a dynamic drop-down list based on the number of cells with contents within the table.

    For cell H2, users can select which category they want (Revenue, Sales, EBITDA, Net Income). However, for cell H3, I want to create a drop-down list where users can only select only the number of cells that have contents. For example, if they choose Revenue, they would be able to select between 1-4, but if they choose EBITDA, they would be able to select between 1-7. The maximum number would be 17 because there are 17 possible selections.

    I tried using a nested-if function such as =IF(H2="Revenue",COUNTA(REVENUE),IF(H2="Sales",COUNTA(SALES), etc. but it does not appear to work for a drop-down list.
    Last edited by johncheng435; 04-20-2022 at 10:17 PM.

  2. #2
    Registered User
    Join Date
    04-20-2022
    Location
    USA
    MS-Off Ver
    OFFICE 365
    Posts
    6

    Re: Data Validation – COUNTA for a list

    Please see below

  3. #3
    Registered User
    Join Date
    04-20-2022
    Location
    USA
    MS-Off Ver
    OFFICE 365
    Posts
    6

    Re: Data Validation – COUNTA for a list

    see attached
    Attached Images Attached Images

  4. #4
    Forum Expert
    Join Date
    09-30-2019
    Location
    Chiangmai, Thailand
    MS-Off Ver
    Office 2016, Excel 2019
    Posts
    1,234

    Re: Data Validation – COUNTA for a list

    you may use OFFSET together with COUNTA to create drop down list.

    Regards.

    Note: all data must not have blank row between them.
    for more information please attach your sample file.

    or you may review this post...
    https://www.excelforum.com/excel-for...ml#post5657376

  5. #5
    Registered User
    Join Date
    04-20-2022
    Location
    USA
    MS-Off Ver
    OFFICE 365
    Posts
    6

    Re: Data Validation – COUNTA for a list

    Thank you! I managed to figure it out

+ 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] VBA to Prevent Data Entry in Cell with Data Validation List - Two Criteria Validation
    By AliGW in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 05-25-2019, 11:48 AM
  2. Replies: 1
    Last Post: 01-14-2018, 11:04 AM
  3. Replies: 3
    Last Post: 06-04-2015, 02:27 PM
  4. [SOLVED] Data Validation: How to clear/delete the content of the cell and not Data Validation List?
    By lukelucky in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-07-2015, 09:42 AM
  5. Replies: 4
    Last Post: 12-19-2013, 10:44 AM
  6. Data validation, IF, OFFSET & COUNTA
    By alfgrey in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-24-2013, 08:27 PM
  7. Replies: 3
    Last Post: 04-11-2011, 05:52 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