Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Anita Morales   on Sep 30 In MS Office Category.

  
Question Answered By: Garritt Bakker   on Sep 30

I see your difficulty.
Your '=IF(H6=I6,"",H6-I6)' formula forces the length of the cell value
to 0 if there is no difference, so by only applying formatting  when
the length is non-zero (ie. TRUE), I can get round it thus:

With ActiveCell.Offset(0, 6)
.FormatConditions.Add _
Type:=xlExpression, _
Formula1:="=LEN(INDIRECT(ADDRESS(ROW(),COLUMN())))"
.FormatConditions(1).Font.ColorIndex = 3
.FormatConditions(1).Interior.ColorIndex = 6
End With
but I see a problem:
Since you want to handle international settings and my solution above
includes a formula as a string expression, this may not carry across
well. I may be having a senior moment, I can't think of an easier way
to refer to the cell in which the conditional  formatting resides other
than INDIRECT(ADDRESS(ROW(),COLUMN())).

Share: 

 

This Question has 16 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Excel 2000 Conditional formatting Or get search suggestion and latest updates.


Tagged: