+ Reply to Thread
Results 1 to 8 of 8

Conditional formating depending on value

  1. #1
    Registered User
    Join Date
    08-03-2015
    Location
    Crete, Greece
    MS-Off Ver
    2013
    Posts
    4

    Conditional formating depending on value

    Hi,

    I have created a reservation list for the max. capacity of tables in a restaurant.

    In the one column will be entered the number of guests, the next column calculates the amount of tables needed.

    In one cell will appear the number of tables used in total with the note if tables will still be available or if the restaurant is full.

    I am looking now for a formular in the conditional formating that highlights automatically the cells in the column for the needed tables if there is going to be an overbooking with the next reservation made.

    To make it more understandable:

    The formular of the cells for the tables needed is

    =IF(D6=0,"",IF(D6<5,1,IF(D6<7,2,IF(D6<9,3,IF(D6<11,4,IF(D6<13,5,IF(D6<15,6,IF(D6<17,7))))))))
    and
    =IF(K6=0,"",IF(K6<5,1,IF(K6<7,2,IF(K6<9,3,IF(K6<11,4,IF(K6<13,5,IF(K6<15,6,IF(K6<17,7))))))))

    For both columns the cell counting the total of tables needed
    =IF(K31>24,"FULL","AVAILABLE")

    Based on the total of tables needed I want the cells in the columns for the reservation of the tables to change the color as soon as the K31 shows FULL.

    Thanks for your help

  2. #2
    Valued Forum Contributor
    Join Date
    05-13-2010
    Location
    Belo Horizonte, Brazil
    MS-Off Ver
    Excel 2003; 2007
    Posts
    441

    Re: Conditional formating depending on value

    kuzcomerlin, Good afternoon.

    Select the colunm you want color.
    Go to Conditional Format Menu --> New Rule --> Using Formula

    Formula =$k$31="FULL"
    Select the color you want at the format field.
    OK.

    Is this what you're looking for?
    I hope it helps.
    ...If my answer helped you, Please, click on. * Add Reputation (at left)

    Best regards.
    Marc?lio Lob?o

  3. #3
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Conditional formating depending on value

    Welcome to the forum.

    Select the cell with the formula =IF(K31>24,"FULL","AVAILABLE")

    In Conditional Formatting, New Rule, Use formula.... enter this formula:
    I have used M1 for the cell with the formula for this example:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Choose the formatting that you want for full. Click OK, Apply and click OK.

    With M1 still selected enter the following in Conditional Formtting, New Rule, Use formula...
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Choose the formatting for AVAILABLE. CLICK, OK, APPLY, OK.

    In this very simple example (only 2 cells used) change the value in K31 and see the colour change in M1
    Attached Files Attached Files
    Last edited by newdoverman; 08-03-2015 at 02:27 PM.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  4. #4
    Registered User
    Join Date
    08-03-2015
    Location
    Crete, Greece
    MS-Off Ver
    2013
    Posts
    4

    Re: Conditional formating depending on value

    Does not work!

  5. #5
    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,926

    Re: Conditional formating depending on value

    You were given 2 different suggestions. Which 1 does not work, what what does "does not work" mean? What is it/is it not doing? (thats like saying "my car is making a funny noise")
    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

  6. #6
    Registered User
    Join Date
    08-03-2015
    Location
    Crete, Greece
    MS-Off Ver
    2013
    Posts
    4

    Re: Conditional formating depending on value

    Both solutions do not work.

    The color for the font I want to change the cell does not change.

    And, to be honest, solution 2 I did not really understand!

    Thanks so much for trying to help!

  7. #7
    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,926

    Re: Conditional formating depending on value

    upload a small (clean) sample workbook (not a pic) of what you are working with, and what your expected outcome would look like.

  8. #8
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Conditional formating depending on value

    I have created two columns of table requirements using your formulae with the total in K31. I also inserted in between the columns of guests and tables a cell that will either indicate Available or Full depending upon the total in K31. If Full, Full will be displayed in red with bold white font and the columns with the table requirements will also turn red until K31 drops to 24 or less.
    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. Replies: 2
    Last Post: 10-15-2014, 08:32 AM
  2. Replies: 5
    Last Post: 03-14-2014, 04:03 AM
  3. Replies: 4
    Last Post: 01-23-2014, 10:14 AM
  4. Replies: 4
    Last Post: 07-08-2013, 06:29 AM
  5. Adding conditional formating depending on user input.
    By haitham1984 in forum Excel General
    Replies: 1
    Last Post: 11-03-2008, 09:31 PM
  6. Replies: 6
    Last Post: 08-14-2006, 05:00 PM
  7. Replies: 1
    Last Post: 03-07-2006, 07:50 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