+ Reply to Thread
Results 1 to 13 of 13

Help with a conditional formatting issue

  1. #1
    Registered User
    Join Date
    06-21-2014
    Location
    London, England
    MS-Off Ver
    2007
    Posts
    6

    Help with a conditional formatting issue

    Hi Guys,

    Hope some one out they can help me, as I am loosing my mind trying to work this out!!!!

    I am trying to do a conditional formatting (fill with colour ) on a blank cell based on if data is correct from on cell in a different cell.

    this is for staff Rota's

    EG:

    Cell B2 = Colour Fill if the data in Cell B1 match's Cell A2

    Cell B 1:09.00-10.00 Cell C1 10.00-11.00

    Cell A 2 09.00-18.00


    Please can any one help?

    or know of a some way to do a formula that can help?

    I am begging, Please or my brain will explode with rage.

  2. #2
    Valued Forum Contributor
    Join Date
    11-02-2012
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    564

    Re: Help with a conditional formatting issue

    In conditional formatting, use a formula to decide which cell to format, enter this formula
    =A2=B1

  3. #3
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: Help with a conditional formatting issue

    you would highlight the cell B2 and then use a formula
    =a2=b1

    why have you provided C1 info

    did you want to apply to a range ?

    perhaps you would attach a spreadsheet with the data and we can go from there

    for 2007 or 2010 excel version
    Conditional Formatting

    Highlight applicable range >>
    B2

    Home Tab >> Styles >> Conditional Formatting
    New Rule >> Use a formula to determine which cells to format
    Edit the Rule Description: Format values where this formula is true:

    =B1=A2

    Format… [Number, Font, Border, Fill]
    choose the format you would like to apply when the condition is true
    OK >> OK
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  4. #4
    Registered User
    Join Date
    06-21-2014
    Location
    London, England
    MS-Off Ver
    2007
    Posts
    6

    Re: Help with a conditional formatting issue

    Hi guys

    thanks for help,

    I just tried that and is was not working, don't know if it can not see it.

    I hope that I have attached the sheet that I am working on
    Attached Files Attached Files

  5. #5
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: Help with a conditional formatting issue

    not sure what you are trying to do here - quite a detailed spreadsheet - needs some explanation

    dont see how A2 , B2 A1 refers to this workbook

  6. #6
    Registered User
    Join Date
    06-21-2014
    Location
    London, England
    MS-Off Ver
    2007
    Posts
    6

    Re: Help with a conditional formatting issue

    Hi Etaf

    that was an example.

    from the work sheet I have attached .

    first tab is a weekly rota, where I fill in peoples times that they are working that week.

    Tab 2 is a brake down of the rota by hours on a Monday, Tab 3 Tue, Tab 4 Wed ETC.

    I work with a lot of people, for who English is not there first langue, so I wish to show them there hours by filling in a block of colour showing them what hours that are due to work on that day. (as they say a picture paints a 1000 words)

    so in the attached sheet Sarah (row 4) is working 09.00-18.00 so I want to fill H4 to Q4 cells with a colour but leave G,Q,R,S and T blank, as she is not working them hours on that day.

    so I need to find a way that Cell H4 looks at H1 (09.00-10.00) and then look at E4 09.00-18.00) and says yes that is an hour that she will be working and fills the cell with a colour.

    hope this clear?

  7. #7
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: Help with a conditional formatting issue

    A few changes required to your spreadsheet

    you need to use find and replace and change all the . to : in the times
    so for example 09.00-20.00 becomes 09:00 and 20:00

    Then you can use a timevalue() to change the text to a real time and use > < =
    also some of your times are just 2300 - so again use find/replace to change 2300 to 23:00 - i have done this on the rota sheet
    i have done this on the workbook

    Now providing you only have a time or D/O in the cells in column E the following will work OK before midnight

    =IF($E4="D/O",FALSE, AND(TIMEVALUE(LEFT($E4,5))<=TIMEVALUE(LEFT(G$1,5)),TIMEVALUE(MID($E4,7,5))>TIMEVALUE(LEFT(G$1,5))))

    and can be used as a conditional formatting

    the issue will be if the shift goes over midnight
    so
    14:00-02:00
    then it will nolonger work ..

    do any shifts go over midnight ?
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    06-21-2014
    Location
    London, England
    MS-Off Ver
    2007
    Posts
    6

    Talking Re: Help with a conditional formatting issue

    Hi Etaf

    thank you so much !!!!!!

    you have really helped me on this, I cant even tell you how much this has been hurting my brain for the last week.


  9. #9
    Registered User
    Join Date
    06-21-2014
    Location
    London, England
    MS-Off Ver
    2007
    Posts
    6

    Re: Help with a conditional formatting issue

    thank you so much!

  10. #10
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: Help with a conditional formatting issue

    your welcome,
    thanks for the rep

    I assume the shifts do not go over midnight - if so then its not going to work

    shifts from 24:00 - 04:00 will work
    BUT
    anytime before 24:00 and past 24:00 will not like
    18:00-01:00

  11. #11
    Registered User
    Join Date
    06-21-2014
    Location
    London, England
    MS-Off Ver
    2007
    Posts
    6

    Re: Help with a conditional formatting issue

    no I will find a way around it, ending shits at 24.00 sorry 24:00

  12. #12
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: Help with a conditional formatting issue

    so no shifts go from before midnight to after midnight
    if so ,then i can stop looking into a solution,

  13. #13
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: Help with a conditional formatting issue

    just noticed 24:00 is also a problem as that resolves to 0 on a timevalue()

    so we can probably use an IF to change that to 23:59 instead
    so IF ( the end of shift is 24:00 - change in the formula to timevalue("23:59")
    then it will still say 24:00 in the shift in both columns

    do we need to look at shifts over midnight
    and do shifts run up to 24:00 ?
    Last edited by etaf; 06-21-2014 at 07:45 AM.

+ 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] Conditional Formatting Issue
    By nikolasm in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 03-12-2013, 01:34 PM
  2. Conditional Formatting Issue
    By Dinho05 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-08-2013, 04:38 PM
  3. Conditional formatting issue
    By Cramer19 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-31-2007, 01:29 PM
  4. Conditional formatting issue
    By delboy2405 in forum Excel General
    Replies: 7
    Last Post: 10-26-2007, 04:54 PM
  5. conditional formatting issue
    By associates in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-22-2006, 03:45 AM

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