+ Reply to Thread
Results 1 to 6 of 6

How to stop conflicts with conditional formatting

  1. #1
    Forum Contributor
    Join Date
    09-17-2009
    Location
    Torquay, England
    MS-Off Ver
    Excel 2013
    Posts
    253

    How to stop conflicts with conditional formatting

    Hi

    I have an example of a booking spreadsheet I am putting together. The sheet colours cells according to date ranges entered (these represent bookings). Upto four separate booking dates are allowed in a month, how can amend the conditional formula to stop any duplicate dates being accepted in a particular room (double bookings)?

    Current formula is and($a4<=c$2,$b4>c$2) This then amends for second, third and fourth bookings in columns AI-AJ. AL-AM, AO-AN.

    Also, when I put together all the other months, is there an easy way of putting dates across the top which will save me having to manually type them in?

    Thanks
    Attached Files Attached Files
    Last edited by Gooford; 10-05-2009 at 11:18 AM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: How to stop conflicts with conditional formatting

    It's not very clear what you mean?

    Can you elaborate with examples?
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Contributor
    Join Date
    09-17-2009
    Location
    Torquay, England
    MS-Off Ver
    Excel 2013
    Posts
    253

    Re: How to stop conflicts with conditional formatting

    Quote Originally Posted by NBVC View Post
    It's not very clear what you mean?

    Can you elaborate with examples?
    Sorry:-

    If I enter an arrival date 1 Jan 09 and a departure date 10 Jan 09 this blocks out these dates in orange on the attached sheet.

    I have the option of 3 addition bookings in a month in a given room so I could then type in 9 Jan 09 until 20 Jan 09 and block that out in orange. However this would mean that the 9 Jan and 10 Jan are covered by both date ranges, therefore double booked (room one, rows 3 and 4).

    I wondered if there was anything I could do to prevent the second date range being accepted if it meant that it overlapped with the first.
    Attached Files Attached Files

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: How to stop conflicts with conditional formatting

    You can use Data Validation possibly...

    e.g..

    While in AI4, go to Data|Validation and select Custom from Allow menu

    Enter formula: =AI4>B4

    this forces AI4 to be later than any date entered in Departure Date in B4...

    You can customize the error message through Error Alert tab..

    use similar approach in other cells.

    Is that what you meant?

  5. #5
    Forum Contributor
    Join Date
    09-17-2009
    Location
    Torquay, England
    MS-Off Ver
    Excel 2013
    Posts
    253

    Re: How to stop conflicts with conditional formatting

    Quote Originally Posted by NBVC View Post
    You can use Data Validation possibly...

    e.g..

    While in AI4, go to Data|Validation and select Custom from Allow menu

    Enter formula: =AI4>B4

    this forces AI4 to be later than any date entered in Departure Date in B4...

    You can customize the error message through Error Alert tab..

    use similar approach in other cells.

    Is that what you meant?

    Spot on thanks!

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: How to stop conflicts with conditional formatting

    Just a note...

    if you intend to copy data validation from one cell to the other, then make column B absolute by adding $

    e.g.

    =AI4>$B4


    so that all validation refers to column B in respective row

+ 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