+ Reply to Thread
Results 1 to 3 of 3

Way to do data validation on cells depending on adjacent cells?

  1. #1
    Registered User
    Join Date
    05-02-2005
    Posts
    65

    Way to do data validation on cells depending on adjacent cells?

    Hello. I have a sheet that track employee absenteeism. I have tabs for each month that lists each employee with adjacent columns for each day of the month. For each day out of the office, we use a code (vacation, sick, bereavement, company holiday, etc.) and we want to compare those codes to some business rules. The rules are things like:
    1) you cannot call in sick the day before vacation or a company holiday (so if the company holiday, "h" is on the 7th of the month, then I want to get notification that a sick ("s") day was entered on the 6th); or
    2) when there is bereavement time, an employee gets 2 days per incident (so if "b" is entered on the 15th, then it would be allowed on the 16th, but when the 17th is attempted, the it would not be allowed).

    It would be great if I could not enter the data that would break the rules (similar to data validation) but it would be fine if this would show is another cell if these rules are broken.

    Thoughts?

    Thank you in advance!

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,932

    Re: Way to do data validation on cells depending on adjacent cells?

    Can you show some sample data, and what you expect?
    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    05-02-2005
    Posts
    65

    Re: Way to do data validation on cells depending on adjacent cells?

    Thank you for your question FDIbbins!

    I have attached a file per you request. If it was only one cell to check, then I think I could handle with variations of if(and/or but I am a bit confused since I have to check every cell in the month. Thoughts?
    Attached Files Attached Files

+ 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. [SOLVED] Combo Box Values depending on adjacent cells
    By Umair.711 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-03-2014, 02:51 AM
  2. [SOLVED] Concatenating adjacent and non adjacent cells depending on entries
    By TBHusker84 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-21-2013, 10:27 AM
  3. Conditional formatting of rows depending on the value of adjacent cells
    By griffindog in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-20-2013, 09:12 PM
  4. Lock adjacent cells depending upon the value
    By npravn1804 in forum Excel General
    Replies: 0
    Last Post: 09-01-2012, 06:59 AM
  5. [SOLVED] Update cells depending on an adjacent cells number
    By debora in forum Excel General
    Replies: 5
    Last Post: 07-13-2012, 11:18 AM
  6. Clear cells depending on data validation list output
    By fergcu in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-07-2008, 05:11 AM
  7. adding non-adjacent cells depending on another cell
    By clayton in forum Excel General
    Replies: 12
    Last Post: 11-30-2006, 12:48 PM

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