+ Reply to Thread
Results 1 to 6 of 6

conditional formatting to change colour of cell based on formula result

  1. #1
    Registered User
    Join Date
    03-14-2009
    Location
    Leeds, England
    MS-Off Ver
    Excel 2003
    Posts
    7

    conditional formatting to change colour of cell based on formula result

    HI

    new here so please be patient

    I am not a master of excel but have been asked to perform a task in this application. I am wanting to make 4 columns .

    col A is a time (say 12:00) col B is a time that will always be after col A (say 12:10) thats the basics
    column C will be either an "I" or an "S".

    If col C is an "I" then column D should be the value of B - A. If this results in a value over 00:12 (12 mins) then it need to be depicted in Red if under 12 then it should be Green.

    If Col C is an "S" then the 12 min threshold changes to an hour. but with the same outcome. Ie if Col A is 12:00 and col B is 13:01 then col D is B - A. (the result being 61 mins which is over the one hour threshold thus should be displayed in red if under in Green.

    I see col C being a drop down box but thats as far as i get. the formula eludes me and some pointers might "open my mind... Quade" sorry to question this on a saturday night.

    thanks for constructive comments in advance.
    Gideon
    Last edited by gideong; 03-14-2009 at 07:12 PM. Reason: title change to meet rules

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Help with formulas

    Can't you just use conditional formatting with column D simply being (B - A)
    Something like

    OR(AND(C1="I"),(D1<TIMEVALUE("00:12"),AND(C1="S"),(D1>TIMEVALUE("01:00))
    set colour to red else green
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Help with formulas

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution. Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.
    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    Also, post in the correct Forum
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  4. #4
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Help with formulas

    Hi Gideon,

    Take a look at the attached workbook - column D contains the necessary conditional formatting.

    Hope this helps - please let me know how you get on.

    Regards,

    Greg M
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    03-14-2009
    Location
    Leeds, England
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: conditional formatting to change colour of cell based on formula result

    Gentlemen many thanks. Not only has my question been answered but i have learned somthing new, comparitivley simple and very helpful. you truly are scholars of this site and the response was in perfect time for my return from the pub. The formulas make perfect sense and the conditional formatting is now in my repotiore for undoubted future use. as is this forum bookmarked under Excel Bible.

    cheers

    Gideon

  6. #6
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: conditional formatting to change colour of cell based on formula result

    Hi Gideon,

    Many thanks for your feedback, I'm very pleased to have been able to help.

    Regards,

    Greg M

+ 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