Results 1 to 2 of 2

Conditional Formatting Formula - Macro

Threaded View

  1. #1
    Registered User
    Join Date
    01-03-2005
    Posts
    35

    Conditional Formatting Formula - Macro

    I'm trying to create a macro

    Sheets("List").Range("A2:L" & LastRow).FormatConditions.Delete
    Sheets("List").Range("A2:L" & LastRow).FormatConditions.Add Type:=xlExpression, Formula1:= _
            "=AND($G2<>"""",H2="""")"
        Selection.FormatConditions(1).Interior.ColorIndex = 38
    I know this is probably really simple, but I'm getting stuck on how to make that H2 so that it's a dynamic reference to the cell in question..

    So if this conditional formatting was applied to H2, it would be correct, if it was applied to H3, that should say H3 and so on.

    Can anyone tell me where I'm going wrong?

    Thanks!
    Last edited by grey; 01-31-2012 at 07:25 AM.

Thread Information

Users Browsing this Thread

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

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