+ Reply to Thread
Results 1 to 6 of 6

Macro that colours cells acording to specific cell

  1. #1
    Forum Contributor
    Join Date
    01-11-2016
    Location
    Brazil
    MS-Off Ver
    2010
    Posts
    125

    Macro that colours cells acording to specific cell

    Hello guys,

    I have a worksheet where:

    Cell D5 = Start Date (example, 31/01/2017)
    Cell E5 = End Date (example, 19/02/2017)

    Then, i have a table with the entire calendar of the year going to the right. What i need is to colour the cells between the Start Date and End Date.

    So, for example, the Start Date 20/01/2017 is Cell "AJ4" and the End Date is in cell "BC5". The Cells in between are coloured in green. I want a macro that colours this automatically according to the values in Cells D5 and E5.

    I have attached a worksheet.

    How can i do this?
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,598

    Re: Macro that colours cells acording to specific cell

    Why does it have to be macro?
    CF formula:
    Please Login or Register  to view this content.
    Ben Van Johnson

  3. #3
    Forum Contributor
    Join Date
    01-11-2016
    Location
    Brazil
    MS-Off Ver
    2010
    Posts
    125

    Re: Macro that colours cells acording to specific cell

    the macro has to find the dates...

  4. #4
    Forum Contributor
    Join Date
    01-11-2016
    Location
    Brazil
    MS-Off Ver
    2010
    Posts
    125

    Re: Macro that colours cells acording to specific cell

    the macro matches the dates on row 4

  5. #5
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,598

    Re: Macro that colours cells acording to specific cell

    Seems like you don't need a macro unless you left something out of your explanation:
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    01-11-2016
    Location
    Brazil
    MS-Off Ver
    2010
    Posts
    125

    Re: Macro that colours cells acording to specific cell

    No.. The macro has to get the value from cell D5 and E5 (which are dates), and then find these values in the calendar. Finding these values, the cells in between each date will be coloured.

+ 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. Colour Specific Interior Cell Colours
    By jodyjohnstone in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-28-2016, 10:55 AM
  2. Specific cell Colours for Specific Days
    By lpfaint43 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-20-2015, 11:50 PM
  3. [SOLVED] VBA to Paste cells acording to list of cell references
    By Malkier in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 06-04-2014, 12:11 AM
  4. [SOLVED] save sheet and name it acording to the specific date
    By laric in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-10-2012, 07:33 AM
  5. macro to repeat all rows cell acording to specific value
    By sherif in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-05-2012, 11:13 AM
  6. [SOLVED] macro to repeat all rows cell acording to specific value
    By ispyhope in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-05-2012, 08:22 AM
  7. how to fillter cells containing specific colours
    By yerolkar in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 05-11-2005, 06:10 AM

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