Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default If any cell in named range = 8 then shade named range

How would I do this please?

If any one of the cells in the range("Block_Three") = 8 then shade the
range("Block_Three") yellow.



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default If any cell in named range = 8 then shade named range

if application.countif(Range("Block_Three"),8) 0 then
Range("Block_Three").Interior.ColorIndex = 6
End if


or if only exactly 1
if application.countif(Range("Block_Three"),8) = 1 then
Range("Block_Three").Interior.ColorIndex = 6
End if

--
Regards,
Tom Ogilvy



"JJ" wrote in message
...
How would I do this please?

If any one of the cells in the range("Block_Three") = 8 then shade the
range("Block_Three") yellow.





  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 770
Default If any cell in named range = 8 then shade named range

JJ,

Use Format -- Conditional Formatting in Excel. Highlight Block_Three and
enter this formula in the dialog:

=COUNTIF(Block_Three,8)

Then choose yellow as the format.

hth,

Doug

"JJ" wrote in message
...
How would I do this please?

If any one of the cells in the range("Block_Three") = 8 then shade the
range("Block_Three") yellow.





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default If any cell in named range = 8 then shade named range

Fantastic Tom, thank you.


"Tom Ogilvy" wrote in message
...
if application.countif(Range("Block_Three"),8) 0 then
Range("Block_Three").Interior.ColorIndex = 6
End if


or if only exactly 1
if application.countif(Range("Block_Three"),8) = 1 then
Range("Block_Three").Interior.ColorIndex = 6
End if

--
Regards,
Tom Ogilvy



"JJ" wrote in message
...
How would I do this please?

If any one of the cells in the range("Block_Three") = 8 then shade the
range("Block_Three") yellow.







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
Referencing a named range based upon Range name entry in cell Barb Reinhardt Excel Worksheet Functions 14 June 20th 07 07:19 PM
Array as a "named range" - formula ok in cells, but error as "named range" tskogstrom Excel Discussion (Misc queries) 11 December 28th 06 04:44 PM
inserting a named range into new cells based on a named cell Peter S. Excel Discussion (Misc queries) 1 June 4th 06 03:53 AM
Getting a named range from a cell value Charles Woll Excel Worksheet Functions 2 February 25th 05 03:39 PM
First and Last cell of a named range Steven K Excel Programming 2 September 14th 04 12:21 AM


All times are GMT +1. The time now is 02:22 AM.

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"