Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default Conditional format if difference in cell values greater than 0.50%

Hello-

I am trying to conditionally format a call using VBA if the value of the cell is equal to or greater than 0.50% based on another cell.

if cell b2 = 2.50%
and cell c2 = 1.85%
then I would want b2 highlighted red as the increase amount is over .50.

Thanks

Scott
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 538
Default Conditional format if difference in cell values greater than 0.50%

Sabosis wrote:

I am trying to conditionally format a call using VBA if the value of the
cell is equal to or greater than 0.50% based on another cell.

if cell b2 = 2.50%
and cell c2 = 1.85%
then I would want b2 highlighted red as the increase amount is over .50.


Depends on what you mean by "highlighted". If you mean "the cell gets filled
with red", use this:

If (Range("B2").Value - Range("C2").Value) 0.005 Then
Range("B2").Interior.Color = vbRed
End If

If you mean "the text is turned red", use this:

If (Range("B2").Value - Range("C2").Value) 0.005 Then
Range("B2").Font.Color = vbRed
End If

If you mean *anything else*, please clarify.

--
Some days you're the pigeon, some days you're the statue.
-- Steven Tyler
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional format lowest value greater than zero and copy formula gailana Excel Discussion (Misc queries) 2 December 10th 09 08:48 PM
Average of difference between dates greater than zero juneturtle Excel Worksheet Functions 6 March 13th 09 05:29 AM
Conditional format - value of one cell greater than another cell Ken Starlin Excel Worksheet Functions 5 November 7th 08 07:32 AM
colors and conditional format - greater than, less than Michele Excel Discussion (Misc queries) 5 October 1st 07 10:38 PM
conditional format greater or less than Micayla Bergen Excel Discussion (Misc queries) 4 May 3rd 05 06:48 AM


All times are GMT +1. The time now is 01:09 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"