Results 1 to 4 of 4

formatconditions - Erratic Results from simple code

Threaded View

  1. #1
    Registered User
    Join Date
    07-27-2010
    Location
    Palo Alto, CA
    MS-Off Ver
    Excel 2003
    Posts
    2

    formatconditions - Erratic Results from simple code

    Please help with this issue... it's driving me mad!

    I have a macro that assigns conditional formatting.. yet it assigns random rows for the addresses $H301 and $B301.

    It is sometimes correct, sometimes above or below a few rows (i.e. $B299 or $B304), and sometimes completely out of range (i.e. $B589).

    Regardless of which random row it picks, it's consistent throughout all three conditional format formulas it sets. Please help me find what's wrong. Thank you in advance!!

    With formatrow
                      With .FormatConditions
                        .Delete
                        .Add Type:=xlExpression, Formula1:="=if(len($B301)>0,1,0)"
                        .Add Type:=xlExpression, Formula1:="=if(($H301-14)< today(),1,0)"
                        .Add Type:=xlExpression, Formula1:="=if(($H301-14 - today())<=$J$1,1,0)"
                      End With
                        .FormatConditions(1).Interior.ColorIndex = 35
                        .FormatConditions(2).Interior.ColorIndex = 3
                        .FormatConditions(3).Interior.ColorIndex = 44
     End With
    Last edited by rkswb; 07-28-2010 at 07:26 PM.

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