+ Reply to Thread
Results 1 to 14 of 14

Conditional formatting: if employee is starting, but date is in between two dates, orange

  1. #1
    Registered User
    Join Date
    02-14-2020
    Location
    AMsterdam, Netherlands
    MS-Off Ver
    365
    Posts
    78

    Conditional formatting: if employee is starting, but date is in between two dates, orange

    Yes, this morning i had roughly the same question, they couldnt start at the same day.
    That one is fixed.

    Now i would like to have another check.
    If we give an employee a startdate, (and its another project,) and the (startdate in combination with the employee) (already has an entry) (because the startdate is in between two dates) then orange fill.
    Attached Files Attached Files
    Last edited by Mr_Excell_Ensie; 09-23-2020 at 08:21 AM.

  2. #2
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: Conditional formatting: if employee is starting, but date is in between two dates, ora

    there is no question stated here.

  3. #3
    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
    80,848

    Re: Conditional formatting: if employee is starting, but date is in between two dates, ora

    The requirements are stated in the second paragraph.

    However, I can’t see where between two dates come into it.

    Based on what is stated in post #1, a COUNTIFS on the employee, date and project number columns could be used in a conditional formatting rule.

    I am not currently able to open the attachment, sorry.
    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.

  4. #4
    Forum Expert
    Join Date
    10-15-2018
    Location
    MA, USA
    MS-Off Ver
    2010, 2019
    Posts
    1,616

    Re: Conditional formatting: if employee is starting, but date is in between two dates, ora

    In the workbook your stated requirement is:
    "Employee CANNOT be on DIFFERENT project on SAME date"
    That's the rule that I have implemented.

    My CF rule highlights all rows that have the same employee and date and have more than one project assigned - is that acceptable?

    CF rule applied to A3:E9
    =COUNTIFS($C$3:$C$9, $C3, $E$3:$E$9, $E3, $A$3:$A$9, "<>"&$A3) >0

    Here's how it looks with your example:

    Mr_Excell_Ensie.png

    Let us know whether this works for you.
    Geoff

    Did I help significantly? If you wish, click on * Add Reputation to say thanks.
    If your problem has been resolved please select ?Solved? from the Thread Tools menu

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

    Re: Conditional formatting: if employee is starting, but date is in between two dates, ora

    CF rule:

    =SUMPRODUCT((1/(COUNTIF($A$3:A3,$A$3:A3))*($C$3:C3=C3)*($E$3:E3=E3)))>1

    Applied to the whole of column E (defined in the rule dialog).
    Attached Files Attached Files

  6. #6
    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
    80,848

    Re: Conditional formatting: if employee is starting, but date is in between two dates, ora

    Your duplicate thread has been closed - please continue here. I've removed the solved tag.

  7. #7
    Registered User
    Join Date
    02-14-2020
    Location
    AMsterdam, Netherlands
    MS-Off Ver
    365
    Posts
    78

    Re: Conditional formatting: if employee is starting, but date is in between two dates, ora

    Yesterday had a similar go, but it didnt end up the right way.
    (I thank those who have given a go!)

    Hence the example given yesterday may be a explained poorly on my behlaf, i tried to give a more comprehensive workbook today.


    The logic is; We try and plan employees for a longer period of time.
    1 employee cannot start on 2 different projects, with the SAME startdate. (This one is fixed already in my actual workbook and needs NO new formatting.)

    In this workbook it should now turn orange or yellow when the following logic is true:

    Row 2 has a start and end date, to this period Pete is assigned. (<- This is the logical operator i guess.)
    Now when enter the combination of Pete, and a date that is found between another combination of Pete+start/end, it should turn yellow.



    Its not impossible for a worker to be on two different projects, on two different days, we just want to be warned to scrutiny if its the most logical to do.

    Kind thanks in advance!
    Attached Files Attached Files

  8. #8
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Conditional formatting: if employee is starting, but date is in between two dates, ora

    It require 2 tests: one for upper assigned projectID and another for job assigment in range O:S

    CF formula for cel E3:

    Please Login or Register  to view this content.
    with 1st COUNTIF to test whether Peter is in another job
    2nd COUNTIF to test whether Peter has been assigned in Planing
    Attached Files Attached Files
    Quang PT

  9. #9
    Registered User
    Join Date
    02-14-2020
    Location
    AMsterdam, Netherlands
    MS-Off Ver
    365
    Posts
    78

    Re: Conditional formatting: if employee is starting, but date is in between two dates, ora

    So far it looks exactly what i need!

    Can I ask for a very small thing though?

    Could please hide the color when there is no entry for employee at all?

    All else should do the trick for me, thank you very, very much!

    Rep added!

  10. #10
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Conditional formatting: if employee is starting, but date is in between two dates, ora

    So, try to build an AND structure =AND(E2<>"",FORMULA)
    CF in E2:
    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    02-14-2020
    Location
    AMsterdam, Netherlands
    MS-Off Ver
    365
    Posts
    78

    Re: Conditional formatting: if employee is starting, but date is in between two dates, ora

    Wow Bebo, many thanks again, this works!

  12. #12
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Conditional formatting: if employee is starting, but date is in between two dates, ora

    Attachment with update.
    Attached Files Attached Files

  13. #13
    Registered User
    Join Date
    02-14-2020
    Location
    AMsterdam, Netherlands
    MS-Off Ver
    365
    Posts
    78

    Re: Conditional formatting: if employee is starting, but date is in between two dates, ora

    Hi Bebo,
    -----edit:
    I didnt think i made the example clear enough.
    The cell S5, relates to start date in P5, the end date for S5 is in Q5.
    So S5 should be blocked in all Column S, for all dates between P5 and Q5.
    (S5 works that whole period, so he cant be planned somewhere else.

    --Below: Original post


    Thank you ever so much

    Hopefully you'll find a quick fix to the answer, in the earlier files.
    Im actually very confident of that.. :D

    Thank you!

    Just after the last columns i added the requested outcome.
    Attached Files Attached Files
    Last edited by Mr_Excell_Ensie; 01-20-2021 at 07:51 AM.

  14. #14
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Conditional formatting: if employee is starting, but date is in between two dates, ora

    CF formula of S5:

    Please Login or Register  to view this content.
    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: 09-23-2020, 04:18 AM
  2. [SOLVED] conditional formatting and dates - is one date less than x week before another date
    By moneypennie21 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-30-2019, 07:51 AM
  3. Conditional Formatting: One date between two other dates
    By kyohnke in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-04-2018, 03:37 PM
  4. [SOLVED] Conditional formatting dates based on date range and day - pt2
    By dancing-shadow in forum Excel General
    Replies: 5
    Last Post: 01-13-2014, 07:12 AM
  5. Conditional formatting changes light orange to weird brown? Consistantly.
    By ThomasCarter in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-28-2012, 11:18 AM
  6. Employee Anniversary date - Conditional Formatting
    By shona3086 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-30-2012, 05:21 AM
  7. Replies: 2
    Last Post: 09-20-2011, 04:45 PM

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