+ Reply to Thread
Results 1 to 7 of 7

Color entire range on conditions

  1. #1
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    Color entire range on conditions

    Hello friends,

    I want to color the entire range on following conditions.

    Column ‘P’ contains ‘Birthdates’
    If there is a birthday today then the entire range should color violet

    Column ‘Q’ contains ‘Marriage anniversary date’
    If there is a marriage anniversary today then the entire range should color pink.

    If there is a birthday and marriage anniversary both today then the entire range should color green
    Please Login or Register  to view this content.
    Any help will be highly appreciated.

    Thanking you in anticipation.
    Sincerely,

    mso3

  2. #2
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    Re: Color entire range on conditions

    Hi friends,

    Here is a workbook attached for your reference.

    Thank you,
    Attached Files Attached Files

  3. #3
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Color entire range on conditions

    Please Login or Register  to view this content.
    instead of creating 3 loops just create one with conditions within that loop
    i choose to use 2 boolean as markers this time
    just seemed easier to map out
    Last edited by humdingaling; 09-15-2015 at 01:32 AM.
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  4. #4
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    Re: Color entire range on conditions

    Hi humdingaling,

    Excellent! Nice approach.

    Thank you and have a nice day.

  5. #5
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    Re: Color entire range on conditions

    Hi humdingaling,

    The code is working fine but after inserting it in my original workbook I’m getting run-time error 13 type mismatch.

    I inserted the code in my original workbook and getting run time error 13 type mismatch on the following line

    Please Login or Register  to view this content.
    The code is:

    Please Login or Register  to view this content.
    Thank you.

  6. #6
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Color entire range on conditions

    Please Login or Register  to view this content.
    make this nested instead...that way if it is blank or not a date it just skips

    Please Login or Register  to view this content.
    replicate for marriage check as well

    if this still doesnt work....check what value "I" is
    maybe the last row method i used in the FOR loop is picking up too many rows

  7. #7
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    Re: Color entire range on conditions

    Hi humdingaling,
    Perfect! Now it's working fine.

    Thank you and have a nice 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. [SOLVED] Select Entire Row When Two Conditions are met in a range
    By jagadeesh.rt in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-20-2014, 12:09 PM
  2. [SOLVED] Highlight only one Cell in the entire row based on conditions
    By ascool_asice in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-23-2013, 06:15 AM
  3. [SOLVED] Highlight entire row based of multiple if conditions.
    By nhi in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-13-2013, 05:59 PM
  4. To make entire row manadatory to fill based on conditions
    By suren in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-11-2013, 02:53 PM
  5. Changes entire row to a certain color
    By Darrell456 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-13-2009, 04:15 PM
  6. colouring the entire row to a color .
    By roshinpp_77 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-09-2006, 04:55 PM
  7. Change entire row color
    By mthomas in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-27-2005, 08:05 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