Results 1 to 2 of 2

VBA Conditional formatting for multiple rows

Threaded View

  1. #1
    Registered User
    Join Date
    09-19-2014
    Location
    europe
    MS-Off Ver
    2013
    Posts
    1

    VBA Conditional formatting for multiple rows

    Hi, I've recorded a macro to apply conditional formatting rules starting from row #4. Is it possible to add a loop that would repeat this until the row 254 based on values in columns B and C of the row it is applied for? (e.g. for row 5 conditional formatting will be based on $B$5 and $C$5)

    Sub TEST()
    '
    ' TEST Macro
    '
    
    '
        Rows("4:4").Select
        Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlBetween, _
            Formula1:="=$B$4", Formula2:="=$C$4"
        Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
        With Selection.FormatConditions(1).Font
            .Color = -1003520
            .TintAndShade = 0
        End With
        With Selection.FormatConditions(1).Interior
            .PatternColorIndex = xlAutomatic
            .Color = 15773696
            .TintAndShade = 0
        End With
        Selection.FormatConditions(1).StopIfTrue = False
    
          
    End Sub



    Thanks in advance!
    Last edited by freelistener; 09-19-2014 at 03:04 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 5
    Last Post: 12-28-2012, 02:06 PM
  2. [SOLVED] Conditional Formatting Multiple Rows
    By LG1987 in forum Excel General
    Replies: 8
    Last Post: 07-16-2012, 09:42 AM
  3. Excel 2007 : Conditional Formatting on multiple rows
    By EsKay! in forum Excel General
    Replies: 1
    Last Post: 11-16-2011, 07:36 PM
  4. conditional formatting with multiple rows
    By tutigan in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 03-02-2011, 04:46 AM
  5. Conditional Formatting for Multiple Rows
    By keithfender in forum Excel General
    Replies: 4
    Last Post: 07-08-2009, 10:07 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