+ Reply to Thread
Results 1 to 4 of 4

Additional CBA code to format date range

  1. #1
    Registered User
    Join Date
    05-06-2022
    Location
    The Netherlands
    MS-Off Ver
    365
    Posts
    20

    Question Additional CBA code to format date range

    Hey guys!

    I'm working on a project planning-sheet and I have asked this forum for help two times before, succesfully.
    Today, I am reaching out again and I think it's for the last time.

    Everything is working as I want it to, except for the following: as you can see in the 'Projects'-tab a project has 3 dates: a starting date, an ending date and a date that a project starts its engineering (preperation phase). In combination with conditional formatting, I made sure that the row gets filled black when an 'x' is entered in column G, this shows the start phase through the end phase.

    Now, I want to mark the start engineering through start phase. So for project 1, this should be 2022-05 until 2022-09. It would be perfect if the marking could have a pattern (like this https://software-solutions-online.co...-fill-pattern/).

    How do I make this? Please let me know if I'm not clear. Thanks in advance!
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,563

    Re: Additional CBA code to format date range

    Perhaps this will help:
    1. For the preparation phase use the following formula as a conditional formatting rule: =AND($A2<>"",I$1>=INDEX(Projects!$C$2:$C$18,MATCH($B2,Projects!$B$2:$B$18,0)),I$1<INDEX(Projects!$D$2:$D$18,MATCH($B2,Projects!$B$2:$B$18,0)))
    2. For the start through end phases use: =AND($A2<>"",I$1>=INDEX(Projects!$D$2:$D$18,MATCH($B2,Projects!$B$2:$B$18,0)),I$1<=INDEX(Projects!$E$2:$E$18,MATCH($B2,Projects!$B$2:$B$18,0)))
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  3. #3
    Registered User
    Join Date
    05-06-2022
    Location
    The Netherlands
    MS-Off Ver
    365
    Posts
    20

    Re: Additional CBA code to format date range

    Quote Originally Posted by JeteMc View Post
    Perhaps this will help:
    1. For the preparation phase use the following formula as a conditional formatting rule: =AND($A2<>"",I$1>=INDEX(Projects!$C$2:$C$18,MATCH($B2,Projects!$B$2:$B$18,0)),I$1<INDEX(Projects!$D$2:$D$18,MATCH($B2,Projects!$B$2:$B$18,0)))
    2. For the start through end phases use: =AND($A2<>"",I$1>=INDEX(Projects!$D$2:$D$18,MATCH($B2,Projects!$B$2:$B$18,0)),I$1<=INDEX(Projects!$E$2:$E$18,MATCH($B2,Projects!$B$2:$B$18,0)))
    Let us know if you have any questions.
    Thank you very much! This works perfectly!

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,563

    Re: Additional CBA code to format date range

    You're Welcome and thank you for the feedback. Please take a moment to mark the thread as 'Solved' using the thread tools menu above your first post. I hope that you have a blessed day.

+ 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: 4
    Last Post: 01-25-2019, 07:49 AM
  2. [SOLVED] Modfication of Existing Code for additional additional cells
    By thilag in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-29-2016, 03:00 AM
  3. [SOLVED] Add new (additional range) to existing code
    By Blake 7 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 01-22-2015, 11:43 AM
  4. [SOLVED] Additional problem related to 1016964-split-of-data-into-seperate-rows-using-a-date-range
    By ploppmongo in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-25-2014, 07:10 AM
  5. Need Formula/VBA Code to convert date in String Format to Normal Date format
    By Karthik Sen in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-18-2012, 04:54 AM
  6. SUM based on Date Range and Additional Integer
    By ALA-INC in forum Excel General
    Replies: 0
    Last Post: 09-06-2011, 02:40 PM
  7. Adding additional range to code
    By rhudgins in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 11-01-2010, 08:32 PM

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