+ Reply to Thread
Results 1 to 5 of 5

VBA - conditional formatting row based on cell value

  1. #1
    Registered User
    Join Date
    04-18-2017
    Location
    NW,UK
    MS-Off Ver
    MS Office 2013
    Posts
    89

    VBA - conditional formatting row based on cell value

    Hello forum

    I am struggling to create VBA code that will conditionally format a row based on there being a date in column A, if blank ignore.My data range is dynamic so it could be 100 rows 1 day and 500 the next.
    I would like columns A:L to be formatted grey if there is a date in column A

    thanks for the help in advance

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    6,288

    Re: VBA - conditional formatting row based on cell value

    You can modify the index to get the specific shade of grey that you want...

    Please Login or Register  to view this content.
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Registered User
    Join Date
    04-18-2017
    Location
    NW,UK
    MS-Off Ver
    MS Office 2013
    Posts
    89

    Re: VBA - conditional formatting row based on cell value

    Thanks for the reply Bernie

    When i ran the code nothing seemed to have happened, i added Sheets("Bulk").Select to make sure it ran on the correct sheet

  4. #4
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,616

    Re: VBA - conditional formatting row based on cell value

    Do you really need a macro for this?

  5. #5
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    6,288

    Re: VBA - conditional formatting row based on cell value

    It works for me - see the attached. The only complication was fractions that could be interpreted as dates, so I changed that part.

    If you still have problems, share a file with some of the values that you have in column A.
    Attached Files Attached Files

+ 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: 2
    Last Post: 09-02-2018, 01:09 PM
  2. Replies: 1
    Last Post: 10-04-2016, 05:17 AM
  3. Conditional Formatting via VBA: Change formatting in range based on value of each cell
    By ralphjmedia in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-12-2013, 10:37 AM
  4. [SOLVED] Conditional formatting based on % in other cell
    By D-smoke in forum Excel General
    Replies: 2
    Last Post: 02-15-2013, 07:52 AM
  5. Replies: 4
    Last Post: 01-06-2012, 05:07 PM
  6. Conditional Formatting based on another Cell
    By Mondy in forum Excel General
    Replies: 6
    Last Post: 10-12-2009, 10:15 AM
  7. Conditional Formatting based on value of another cell
    By pickledmuffin in forum Excel General
    Replies: 3
    Last Post: 05-19-2008, 06:40 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