+ Reply to Thread
Results 1 to 12 of 12

data validation question

Hybrid View

  1. #1
    Registered User
    Join Date
    05-31-2007
    Posts
    16

    data validation question (updated question)

    Hello,

    I'm new to Excel and I've just figured out how to use Data Validation to create these handy dropdown boxes, at any rate here is my question:

    Is there a formula that I can use that takes the information from a column (or row) that has data validation boxes w/ either a "yes" or "no" option and have it return the % of "yes" and "no" answers.

    I'm not sure if that makes any sense, but...if have a list of 72 items and in columns C1-C72 have the data validation boxes in them, and 40 are selected as "yes" and 32 are selected as "no", is there a formula I can use to have box C73 tell me the % of 'yes" answers and box C74 tell me the % of "no" answers.

    Any help would be greatly appreciated.

    Kind regards,
    Last edited by sous2817; 05-31-2007 at 10:03 PM. Reason: updated question

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Try:

    =COUNTIF($C$1:$C$72,"yes")/COUNTA($C$1:$C$72)

    and

    =COUNTIF($C$1:$C$72,"no")/COUNTA($C$1:$C$72)
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    05-31-2007
    Posts
    16
    Thanks! Works perfectly. I can't thank you enough for your help and quick response...

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    You're welcome!

  5. #5
    Registered User
    Join Date
    05-31-2007
    Posts
    16

    New question

    Hello again,

    I'd like to make my spreadsheet a little more complex....

    Now that I can make a "yes" and "no" drop down box, and thanks to NBVC I have the formula I need, here is my next question:

    Is there any way to make the remainder of a row conditional on an earlier response. So, building on my previous example, in column C1-C72 the user has the option to choose either "yes" or "no". So let's say the heading of column C is "Do you like ice cream". The heading for column D is "What flavors". I don't want the user to be able to input any data in column D if they answered "no" in column C. That way I can figure out what % of people like ice cream and the % of what people prefered a specific flavor of ice cream and hopefully limit the chance that the user will put in data in the wrong field. Does that make any sense?

    Again, any help would be wonderful.

    Kind regards,

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    You can use data validation for that too!

    select the range next to the range that has the yes/no dropdown.

    let's say as in your first example, this range is D1:D27.

    After selecting the range go to Data|Validation and choose Custom from the Allow menu. In the formula field enter: =C1="yes"

    where C1 is the top most cell in the yes/no range.

    Now if the user selects "no" in C1 and tries to type something in D2, he will get an error message.....

    Note: this error message is editable to your taste via the other tabs in the Data Validation dialogue box.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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