+ Reply to Thread
Results 1 to 6 of 6

Conditionally format multiple dates in a single row

  1. #1
    Registered User
    Join Date
    07-02-2021
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    19

    Conditionally format multiple dates in a single row

    I'm seeking help. I'm trying to conditionally format multiple dates for one person from a report and project them onto a roll book
    The report generates workplace names and the type of leave they will be taking within a date range.
    I will provide an example workbook but for reference the data is generated like this:
    ID NO~PERSON~TYPE OF LEAVE~BEING~END DATE
    ~123~PERSON A~SICK LEAVE~01/01/22~02/01/22
    ~123~PERSON A~LEAVE~05/01/22~07/01/22
    I Import the data as a text file and delimit it to break it up.
    I'm hoping this can be acheived.
    I'm aware of the following formulas OR(AND( set the ranges ) but the report is never the same each month one person can take multiple or one type of leave.
    Any help is much appreciated.
    Attached Files Attached Files

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

    Re: Conditionally format multiple dates in a single row

    Person name in Report list is not exactly (PERSON A with trailing space). I would suggest using the ID instead.
    Try in C2:
    =SUMPRODUCT(($A$7:$A$15=$A2)*($C$7:$C$15<=C$1)*($D$7:$D$15>=C$1))

    CF formula in C2:
    =SUMPRODUCT(($A$7:$A$15=$A2)*($C$7:$C$15<=C$1)*($D$7:$D$15>=C$1))>0

    Apply to whole month
    Attached Files Attached Files
    Quang PT

  3. #3
    Registered User
    Join Date
    07-02-2021
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    19

    Re: Conditionally format multiple dates in a single row

    Perfect Bebo. The use of individual ID works great. Is there a way to differentiate types of leave by color?

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

    Re: Conditionally format multiple dates in a single row

    For example, CF for "SICK LEAVE"

    =SUMPRODUCT(($A$7:$A$15=$A2)*($B$7:$B$15="SICK LEAVE")*($C$7:$C$15<=D$1)*($D$7:$D$15>=D$1))>0
    Pick a colour

    Similar to other leave

  5. #5
    Registered User
    Join Date
    07-02-2021
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    19
    Thanks for the help, the formula works as wanted. The issue I have run into now is the worksheet is tremendously slow and wont let me scroll down at times or freezes. Is there a fix for this?

  6. #6
    Registered User
    Join Date
    07-02-2021
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    19

    Re: Conditionally format multiple dates in a single row

    I had a spark of inspiration and fixed my issue by using COUNTIFS made it much quicker

+ 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. Conditionally Format Multiple values
    By chaliseyp in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-25-2021, 01:24 AM
  2. [SOLVED] Conditionally format multiple rows.
    By jrhelp in forum Excel General
    Replies: 4
    Last Post: 07-19-2019, 10:11 AM
  3. [SOLVED] Conditionally format expiration dates
    By MsHotsauce in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-09-2019, 08:02 AM
  4. Replies: 1
    Last Post: 01-04-2017, 05:59 PM
  5. conditionally format entire row for dates 15 days past today's date?
    By chalter in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-11-2014, 11:46 AM
  6. [SOLVED] Conditionally format cell based on dates within a number of days apart
    By mjy58 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-24-2013, 06:01 PM
  7. Replies: 4
    Last Post: 07-24-2011, 11: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