+ Reply to Thread
Results 1 to 10 of 10

Data validation across multile columns

Hybrid View

  1. #1
    Registered User
    Join Date
    06-07-2016
    Location
    Alton, England
    MS-Off Ver
    Excel 2013
    Posts
    5

    Data validation across multile columns

    hello all!

    I have a spreadsheet which is an order form with products down the left, then columns where you can enter quantities required, then the line total is calculated on the far right. What i am trying to achieve is to limit the total value of items that can be added to a maximum value of 15.00GBP. So, the range E9 to I89 contain the cells where people can enter quantities. What i have tried so far is a data validation formula =MIN(K7,SUM(E89:I169)). K7 is a cell which contains the value 15.00. I have also tried changing the formula by locking the columns or the rows using the F4 key but that hasnt solved it. Please can someone help?? thanks...

  2. #2
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: Data validation across multile columns

    Hi, welcome to the forum.

    I'm not sure if your range is E9:I89 or E89:I169 as you've given both, so change the range as needed in this Data Validation formula:
    Formula: copy to clipboard
    =SUM($E$9:$I$89)<=$K$7

    Apply it by first selecting the range, then going to Data Validation, select 'Custom' and enter the formula. Make sure you include the $s to make the references absolute.

    Hope that does what you want.


    Edit: when invalid data is entered, the default error message is 'The value you entered is not valid. A user has restricted values that can be entered into this cell.' You can change this message using the 'Error Alert' tab in the Data Validation dialogue box.
    Last edited by Aardigspook; 06-07-2016 at 07:32 AM. Reason: Add additional comment
    Regards,
    Aardigspook

    I recently started a new job so am a bit busy and may not reply quickly. Sorry - it's not personal - I will reply eventually.
    If your problem is solved, please go to 'Thread Tools' above your first post and 'Mark this Thread as Solved'.
    If you use commas as your decimal separator (1,23 instead of 1.23) then please replace commas with semi-colons in your formulae.
    You don't need to give me rep if I helped, but a thank-you is nice.

  3. #3
    Registered User
    Join Date
    06-07-2016
    Location
    Alton, England
    MS-Off Ver
    Excel 2013
    Posts
    5

    Re: Data validation across multile columns

    Many thanks for your response! Apologies for the confusion it is E9:I89. have done exactly as you said... however it doesn't prevent a user exceeding 15.00... any ideas?? Thank you

  4. #4
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: Data validation across multile columns

    It seems to work okay for me. In the attached sheet I've applied the DV to E9:I89 and entered £15.00 in K7, then entered £0.50 in 30 cells within the DV range, totalling £15.00. If I try to enter any figure in any other cell in the range, or increase any of the £0.50 entries, it throws up the error message I've entered (Your total sum entered exceeds the limit. Please review your choices.).
    The sheet isn't protected in any way.
    Please check if this sheet works for you.


    Additional extra option:
    I've put a second sheet on as well, which checks if the entry being made is a number - if not, that's blocked with an error message as well. That uses this DV formula:
    Formula: copy to clipboard
    =AND(ISNUMBER(E9),SUM($E$9:$I$89)<=$K$7)

  5. #5
    Registered User
    Join Date
    06-07-2016
    Location
    Alton, England
    MS-Off Ver
    Excel 2013
    Posts
    5

    Re: Data validation across multile columns

    Thanks for your additional input. I have downloaded your sheet and reviewed your comments. My sheet is slightly different in that the input values are just quantities and the values are calculated separately. I have attached the sheet and some screenshots if you cant open the sheet - hope you are able to shed some light on it! thank you again.
    Attached Images Attached Images
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: Data validation across multile columns

    Ah, that changes things a bit. I can't open the attached sheet where I am now (firewall issues with .xlsm files) but I'll have another look when I'm at home tonight. I think I see how to do it, but can also see a potential 'gotcha' so I'll get back to you once I've had a go.

  7. #7
    Registered User
    Join Date
    06-07-2016
    Location
    Alton, England
    MS-Off Ver
    Excel 2013
    Posts
    5

    Re: Data validation across multile columns

    Excellent - thanks in advance!

  8. #8
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: Data validation across multile columns

    Okay, it's actually fairly simple. Since you've got the total in cell K90, use this as the DV formula:
    Formula: copy to clipboard
    =$K$90<=$K$7


    Since you've named K7 as 'BudgetTotal', you could use that in the formula instead. If you do the same with the K90 total (let's say Named as 'TotalSpend') then you'd get this:
    Formula: copy to clipboard
    =TotalSpend<=BudgetTotal

    With both cells named, it doesn't matter if you add rows or columns - the DV formula will stay the same.

    Hope that helps.

  9. #9
    Registered User
    Join Date
    06-07-2016
    Location
    Alton, England
    MS-Off Ver
    Excel 2013
    Posts
    5

    Re: Data validation across multile columns

    Excellent! Thank you!! That has sorted it... - very helpful.

  10. #10
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: Data validation across multile columns

    You're welcome - thanks for the feedback and the rep.

+ 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. Data validation with two columns
    By Gerard66 in forum Excel General
    Replies: 7
    Last Post: 09-08-2014, 02:36 AM
  2. Exclude items from Data Validation List based on another columns data
    By amartin575 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-19-2013, 11:53 AM
  3. [SOLVED] Add Data Validation to columns D:U when there is a name in col A of the same row
    By stolen_83 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-18-2013, 11:39 PM
  4. Pull Data from Multiple Columns Based On Data Validation List Selection
    By CHRISOK in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-13-2013, 11:41 PM
  5. splitting multile lines in one cell into columns
    By m4rty5miff in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-11-2012, 08:53 AM
  6. Replies: 7
    Last Post: 12-15-2011, 04:29 PM
  7. If a value is between, and multile between
    By feejo in forum Excel General
    Replies: 4
    Last Post: 11-06-2007, 11:40 AM

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