+ Reply to Thread
Results 1 to 5 of 5

Conditional Formatting & OR Function

  1. #1
    Registered User
    Join Date
    03-25-2013
    Location
    Reading, England
    MS-Off Ver
    Excel 2010
    Posts
    81

    Conditional Formatting & OR Function

    Hi All,

    Wondering if anyone can help.

    I need to create a timesheet for a member of my staff.

    I've been able to use conditional formatting to enter the start and finish times on the spreadsheet is a "1" is entered in any columns M to P.

    However, the total hours doesn't recognise the times entered via the conditional formatting for because the inlay number is zero.

    So trying to create a formula using IF and OR but having little success, I've attached a copy my spreadsheet.

    Any help will be greatly appreciated.

    Thanks
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    81,091

    Re: Conditional Formatting & OR Function

    The syntax of the formula is wrong. In WORDS, please explain what you are trying to get it to do.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    03-25-2013
    Location
    Reading, England
    MS-Off Ver
    Excel 2010
    Posts
    81

    Re: Conditional Formatting & OR Function

    Hi AliGW,

    Many thanks for your reply.

    So what I'm trying to do that if my member of staff works their normal hours they can keys those in normally and the total hours in column "I" does the cumulative total.

    But if the member of staff falls in the criteria in any of columns M to P, the conditional formatting kicks in a enters the start and finish times but also need the total hours in column "I" to work with the conditional formatting they don't, so thought using a IF and OR string of formulas might.

    For example:

    Monday - Start at 08:15 and finish at 12:45 - this is entered manually by the member of staff and columns "I" and "K" formulas work out total hours and difference.

    Tuesday - Member of staff on Annual Leave - Puts a "1" in column "M", the conditional formatting kicks in, enters the start and finish time, then the formula which is the other part of the OR formula kicks in because a "1" have been entered and enters the total hours, so the formula in column "k" kicks in.

    Originally, this was the formula I was working towards in column "I":

    =IF(OR(SUM(E5-D5)+(G5-F5),(IF(SUM(M5:P5)>0,"05:00","0:00")

    I hope that makes sense.

  4. #4
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,212

    Re: Conditional Formatting & OR Function

    IF you actually mean a conditional sum in cell i5

    =IF(SUM(M5:P5)>0,"05:00",SUM(E5-D5)+(G5-F5))

    might be what you need

    Dav

  5. #5
    Registered User
    Join Date
    03-25-2013
    Location
    Reading, England
    MS-Off Ver
    Excel 2010
    Posts
    81

    Re: Conditional Formatting & OR Function

    Quote Originally Posted by davsth View Post
    IF you actually mean a conditional sum in cell i5

    =IF(SUM(M5:P5)>0,"05:00",SUM(E5-D5)+(G5-F5))

    might be what you need

    Dav
    Brilliant, thanks Dav, that's exactly what I wanted.

    Have a good Monday all.

+ 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. conditional formatting & AND function
    By david zerykier in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-21-2014, 02:03 PM
  2. [SOLVED] IF function with Conditional Formatting
    By gast261 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-12-2014, 08:27 PM
  3. Conditional Formatting with IF function
    By navneetvyas in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-05-2013, 03:36 AM
  4. AND() function in conditional formatting
    By demonfly100 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 08-21-2012, 06:03 AM
  5. Replies: 3
    Last Post: 01-30-2011, 07:40 AM
  6. Can we do OR function in Conditional Formatting?
    By Lewis Koh in forum Excel General
    Replies: 6
    Last Post: 12-15-2009, 05:58 AM
  7. Conditional Formatting - IF Function?
    By Jings in forum Excel General
    Replies: 5
    Last Post: 06-08-2009, 01:01 PM
  8. Conditional formatting and If function?
    By dond in forum Excel General
    Replies: 4
    Last Post: 07-22-2005, 08:19 AM

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