+ Reply to Thread
Results 1 to 3 of 3

Data Validation with function

  1. #1
    Registered User
    Join Date
    01-07-2014
    Location
    Bothell, Washington
    MS-Off Ver
    Excel 2010
    Posts
    8

    Red face Data Validation with function

    Hello!

    I have four cells in a column (c1, c2, c3, c4). The sum of these cells should equal one for True. Users will be adding weight values (i.e, .05,.25, etc).
    The sum of the values should be 1 not over.
    Trying to use data validation so I can display an error when the weight values need to be adjusted.
    In data validation, I use the customer option so I can enter a formula. I have tried IF and OR functions, but without luck.
    Logic steps:
    If weight value in c1 >= 1
    Or
    If weight value in c1+c2 >= 1
    Or
    If weight value in Sum(c1:c3) >=1
    OR
    If weight value in Sum(c1:c4) >=1

    Display error message for user to adjust their weight values.
    Simple enough. Trying to do this in Data Validation because I want the error msg to display when the value the user enters puts the total over 1, so I'm attempting to cover each new cell value with previous cell values.
    Can I do this data validation or does this require VBA?

    Many thanks!

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,175

    Re: Data Validation with function

    Select C1:C4 and Data Validation > Custom
    Formula =SUM($C$1:$C$4)<=1
    Set up appropriate error formula
    Does that work for you?
    ChemistB
    My 2

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    01-07-2014
    Location
    Bothell, Washington
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Data Validation with function

    Wow, I really had started that formula, but it didn't work. HOWEVER, it didn't work because I apparently had not 'cleaned up' properly after myself during my test validations.
    Thank you!

+ 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: 0
    Last Post: 10-03-2013, 02:02 AM
  2. Data Validation and IF function
    By Edexcel386 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-11-2011, 10:37 AM
  3. IF Function & Data Validation
    By oceans11 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-15-2011, 11:51 PM
  4. Function in data validation that keeps user from entering duplicate data?
    By comptechbranden in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-26-2007, 05:31 AM
  5. Data Validation Function Help
    By John Jost in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-22-2005, 11:30 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