Results 1 to 6 of 6

VBA Conditional Format Cells based on multiple condition

Threaded View

  1. #1
    Registered User
    Join Date
    03-20-2013
    Location
    chicago
    MS-Off Ver
    Excel 2010
    Posts
    10

    Question VBA Conditional Format Cells based on multiple condition

    HI,
    I am trying to add conditional formatting to a sheet in the workbook through a macro. I have multiple conditions in columns H & K & P; if column 'F' has certain value then color of row changes based on range. Then I want that row to change if the value in column 'H' is either "Approved, Resubmit, Rejected", if 'Rejected' the row would change to different color (red).

    Below is the code I have so far, don't relly know how to add additional condition through Macro. I am able to do this within the sheet with multiple condition but, I am having issues with it when I combine data from other sheets. So, need to go Macro route.

    Private Sub Worksheet_Change(ByVal Target As Range)
        If Intersect(Target, Range("A2:p100")) Is Nothing Then Exit Sub
        Select Case Cells(Target.Row, "F").Value
            Case "Team1"
                Range(Cells(Target.Row, "A"), Cells(Target.Row, "P")).Interior.ColorIndex = 44
            Case ""
                Range(Cells(Target.Row, "A"), Cells(Target.Row, "P")).Interior.ColorIndex = xlNone
            Case Else
                Range(Cells(Target.Row, "A"), Cells(Target.Row, "P")).Interior.ColorIndex = 6
        End Select
    End Sub

    Thanks.
    Attached Files Attached Files
    Last edited by nimesh29; 10-12-2017 at 12:07 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] conditional format 1 cell based on multiple criteria of other cells
    By SKooLZ in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 05-13-2015, 05:44 AM
  2. [SOLVED] Conditional Format - adding several data cells for one condition
    By JerBear in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 05-01-2013, 09:47 AM
  3. Conditional Format based on multiple cells
    By nelg001 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-25-2013, 08:57 PM
  4. Conditional Format to look in multiple cells based on another cell
    By proaction in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-29-2011, 11:02 AM
  5. Conditional Format where condition is based on external cells
    By MNPhats in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-07-2011, 05:07 PM
  6. Format cells based on condition
    By keithnrhonda in forum Excel General
    Replies: 1
    Last Post: 09-05-2010, 07:31 AM
  7. Replies: 7
    Last Post: 06-12-2009, 03:56 AM

Tags for this Thread

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