Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default trouble with conditional formatting

I am trying to conditionally format any cell over the number 20. But when I
apply my code I get text included. I can't seem to figure out how to eliminat
the formatting from the cells in the range that contain text.

HELP!!!


=================================================
For Each cell In xlRng '.Range("A4:A500")
If cell.Value 20 And cell.Value Then cell.Interior.ColorIndex = 3
Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default trouble with conditional formatting

For Each cell In Range("A4:A500")
If IsNumeric(cell.Value) And cell.Value 20 Then _
cell.Interior.ColorIndex = 3
Next


--

HTH

RP
(remove nothere from the email address if mailing direct)


"tilu" wrote in message
...
I am trying to conditionally format any cell over the number 20. But when

I
apply my code I get text included. I can't seem to figure out how to

eliminat
the formatting from the cells in the range that contain text.

HELP!!!


=================================================
For Each cell In xlRng '.Range("A4:A500")
If cell.Value 20 And cell.Value Then cell.Interior.ColorIndex =

3
Next



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 983
Default trouble with conditional formatting

If cell.Value 20 And IsNumeric(cell.Value) Then cell.Interior.ColorIndex = 3

"tilu" wrote:

I am trying to conditionally format any cell over the number 20. But when I
apply my code I get text included. I can't seem to figure out how to eliminat
the formatting from the cells in the range that contain text.

HELP!!!


=================================================
For Each cell In xlRng '.Range("A4:A500")
If cell.Value 20 And cell.Value Then cell.Interior.ColorIndex = 3
Next

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
Trouble w/ conditional formatting and dates Studebaker Excel Discussion (Misc queries) 5 March 7th 09 09:46 PM
2003: Having trouble with conditional formatting with custom user function (Repost) Clif McIrvin[_2_] Excel Worksheet Functions 5 February 17th 09 09:25 PM
Trouble Finding Duplicate Values with Conditional Formatting Diane Excel Discussion (Misc queries) 2 May 20th 07 04:00 PM
Trouble formatting Jane Excel Worksheet Functions 1 May 17th 05 05:30 PM
Trouble with a conditional statement Jim New Users to Excel 2 April 10th 05 10:13 PM


All times are GMT +1. The time now is 03:47 PM.

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

About Us

"It's about Microsoft Excel"