+ Reply to Thread
Results 1 to 7 of 7

Conditional data validation

  1. #1
    Registered User
    Join Date
    05-09-2014
    MS-Off Ver
    Excel 2010
    Posts
    18

    Conditional data validation

    Hi All,

    I am one of a group of volunteers who look after a village hall. We have a basic accounts sheet with a column for income and another for expense. We also have a column for 'category'.

    The category is to help us group certain types of incomes and expenditures - examples of incomes might be Donations, Bookings, Events (actually precious few!). Details of categories of expense would include Licenses, Utilities, Maintenance, Cleaning etc ... a lot more expenses than incomes!

    I have data validation set up so that all items can be given a category and the categories then display the sum of all appropriate values - so I can see at a glance how much is spend on cleaning etc.

    The Category column contains the validation and is key to me being able to summarise annual accounts. Currently the data validation list is separate and contains both incomes and expenses. What I'd like is to delete the data validation master list and to use the two summary lists instead. The Category colum would have data validation that depends on whether there was an amount on the 'Income' column or in the 'Expense' column.

    SO ... in excel english what I'd like is to set up data validation that says:
    If there is no amount in either the income or expense cell for this row error "please enter an income or expense amount first"
    if the cell in the income cell for this row has a value then use the validation list "incomelist"
    If the cell in the expense cell for this row has a value then use the validation list "expenselist"

    I've been having a bit of a look around and found the 'indirect' function that I don't fully understand but I continue to work on that.

    https://www.excelforum.com/attachmen...1&d=1617027462

    Hoping this wont be too complex but I can't seem to get it at the moment.
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by BremhillBob; 03-29-2021 at 10:21 AM.

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,054

    Re: Conditional data validation

    Hi there.

    A picture is worth 1,000 words. An Excel sheet is worth 1,000 non-editable pictures.

    Please read the yellow banner about sample worksheets, at the top of the screen. Act on its guidelines and post a SMALL sample sheet complete with an explanation and some expected results.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,080

    Re: Conditional data validation

    Greetings from up the road.
    How about using this formula in the data validation
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    05-09-2014
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: Conditional data validation

    Hi Fluff ... good to know there is an excel guru close by ...

    I noticed a naming error in my list names (ExpenceNames rather than ExpenseNames) now fixed but ....

    What you suggest is pretty much what I want and if I type that into a custom validation then it works for the ExpenseNames list but not for the IncomeNames list.

    As an ugly workaround I have created an extra column that calculates which list should be used in the validation then my data validation simply says validate by a list = indirect(cell reference - in my case H19).
    This kind of works and give me a little error checking on the incomes and expenses entries

    https://www.excelforum.com/attachmen...1&d=1617030512
    Attached Files Attached Files

  5. #5
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,080

    Re: Conditional data validation

    I've changed the formula to
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    so that you don't get a list if both Income & Expense are blank, but otherwise it works for me
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    05-09-2014
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: Conditional data validation

    Perfect. It took me quite a while to sort out - I just couldn't get it to work on my actual sheet even though the 'demo' sheet worked perfectly. Turns out my 'actual' data started on row 18 so I was validating on the next row down. What I call a 'PICNIC' problem...
    (Problem In Chair Not In Computer).
    Thanks for your help. Happy bunny

  7. #7
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,080

    Re: Conditional data validation

    Glad you sorted it & thanks for the feedback.

+ 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: 3
    Last Post: 02-11-2019, 03:54 PM
  2. Replies: 2
    Last Post: 10-22-2015, 04:18 PM
  3. Conditional data validation
    By gibbsa08 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-04-2015, 03:05 AM
  4. [SOLVED] Conditional Data Validation Drop-down Lists with Large Amounts of Data
    By Aimee S. in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-27-2015, 01:42 PM
  5. Conditional Formatting or Data Validation for 1 cell based on another but limited data?
    By ExcelBeginner326 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-10-2015, 01:25 PM
  6. conditional data validation
    By jpbisani in forum Excel General
    Replies: 3
    Last Post: 09-12-2011, 06:54 AM
  7. Conditional Data Validation
    By ChrisMattock in forum Excel General
    Replies: 3
    Last Post: 01-06-2009, 12:03 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