+ Reply to Thread
Results 1 to 9 of 9

Filling the cells by color following period between two datums.

  1. #1
    Registered User
    Join Date
    10-16-2014
    Location
    Republic Czech
    MS-Off Ver
    Czech
    Posts
    32

    Filling the cells by color following period between two datums.

    Please check the description in attached file for better understanding.

    I have added logic function where I can change the status for example X (instead of OK) and the cell in the same line and the same column will change from OK to X.

    I would like to keep it as it is but I would like to mark with the same status and color the date from start what in this case is 10.01.2017 till the end 12.01.2017 (look the example in the line 7- (3 cells marked with green color and written condition OK as the date 10.01.2017 + 11.01.2017 + 12.01.2017.

    The solution should be applycable for all table and simply adjustable if possible in case of any future modification.

    Thank you
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Filling the cells by color following period between two datums.

    Not sure I understand what you are asking.

    If you just want to turn the background color to green for all the "OK" cells, use Conditional Formatting (link)

    • Select cell K7:BJ58
    • change the background fill color to grey
    • Select from the menu Format\Cells\Conditional Formatting
      - Condition Cell value = "OK" and set the background for green.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Registered User
    Join Date
    10-16-2014
    Location
    Republic Czech
    MS-Off Ver
    Czech
    Posts
    32

    Re: Filling the cells by color following period between two datums.

    In the file if you will change is Starting date and End date. Between those two days is always an period for example of two days like from 10.01.2017 till the end 12.01.2017.
    So I suppose that I should have a function which will check the starting date for example 10.01.2017 mark it by green color as it is now in my file, but also will mark by the same condition the days between what means 11.01.2017 and 12.01.2017.

    Once the action is done I will simply change the status for OK and all three cells will be in green. If the status will be in delay I will change the status on X and the three cells (the same cells) will become to red.

    I hope that now you can see what I´m searching for.

    Thank you

  4. #4
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Filling the cells by color following period between two datums.

    Yes. Conditional Formatting would do that
    Tutorial: http://www.contextures.com/xlCondFormat01.html
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    10-16-2014
    Location
    Republic Czech
    MS-Off Ver
    Czech
    Posts
    32

    Re: Filling the cells by color following period between two datums.

    Yes I understand what you have done and this is good.
    But I need something what will check the starting date and end date and after that will transfer the status + color to all the cells between both dates including this date automaticaly. I do not want to do it manualy because it is waste of time
    Attached Files Attached Files

  6. #6
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Filling the cells by color following period between two datums.

    Put this formula in K7 and copy it across and down the table.

    =IF(AND(K$5>=$I7, K$5<=$J7),$H7,"")

  7. #7
    Registered User
    Join Date
    10-16-2014
    Location
    Republic Czech
    MS-Off Ver
    Czech
    Posts
    32

    Re: Filling the cells by color following period between two datums.

    It´s works pretty well.
    Thank you!

    Have a nice day

    Regards

  8. #8
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Filling the cells by color following period between two datums.

    You're welcome.

    Your table is called a Conditional Formatting Gantt Chart if you ever need to ask someone for help again or do an internet search.

  9. #9
    Registered User
    Join Date
    10-16-2014
    Location
    Republic Czech
    MS-Off Ver
    Czech
    Posts
    32

    Re: Filling the cells by color following period between two datums.

    Thank you.
    I was not aware that there is exmplanation how to do the Gantt Chart in Excel . Good to know

+ 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. Filling the cells by color following period between two datums.
    By Topa2 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-12-2017, 02:19 PM
  2. Highlighting a row(Filling a row automatically with a different color)
    By dimuthumme in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-06-2015, 06:22 AM
  3. Filling adjacent cells with same fill color
    By watido88 in forum Excel General
    Replies: 3
    Last Post: 01-02-2013, 06:43 PM
  4. [SOLVED] Quickly color filling the backround of every other row.
    By Rixonomic in forum Excel General
    Replies: 3
    Last Post: 12-01-2012, 08:00 PM
  5. [SOLVED] Script for filling cells with specific color
    By adygelber in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-11-2012, 05:01 AM
  6. color filling when I don't ask it to
    By Audi in forum Excel General
    Replies: 1
    Last Post: 02-13-2012, 11:45 AM
  7. Changing text/color after a time period?
    By metalsped in forum Excel General
    Replies: 2
    Last Post: 07-15-2005, 12:53 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