+ Reply to Thread
Results 1 to 4 of 4

data validation based on value of another cell

  1. #1
    Registered User
    Join Date
    09-19-2008
    Location
    Gloucester, MA
    MS-Off Ver
    Excel 2016
    Posts
    62

    data validation based on value of another cell

    I can't seem to find an example of this, so thought I'd post. I'm trying to do some data validation of a cell based on the value of another cell.

    If cell A1 is No, then I want cell B1 to equal 0 only.

    If cell A1 is Yes, then cell B1 can be any decimal value between 0 and 50, with a default of 3.

    Can this be done easily enough with a custom data validation formula?

    Thanks.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: data validation based on value of another cell

    Custom validation: =IF(A1="no", B1=0, AND(MOD(B1,1)=0, B1>=0, B1<=50))

    The cell value will not (does not) change when you change A1 --- that would require VBA.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    09-19-2008
    Location
    Gloucester, MA
    MS-Off Ver
    Excel 2016
    Posts
    62

    Re: data validation based on value of another cell

    This worked great! Thanks.

    Now, how can I make these percentages and not numbers. For instance, I'd like the user to enter 50, but it should actually represent 50% (.50). When I format the cell to be a percentage the 50 is actually 500%. Is there any way around this?

    You're always so helpful - much appreciated!!

    Karyn

  4. #4
    Valued Forum Contributor khamilton's Avatar
    Join Date
    10-08-2009
    Location
    IL
    MS-Off Ver
    Excel 2007
    Posts
    345

    Re: data validation based on value of another cell

    mine works when i do format cells--custom--select 0%

+ 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