Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
eve eve is offline
external usenet poster
 
Posts: 23
Default how do i shade all identical cells automatically

I want to shade all the identical cells in a large spread sheet to pick out a
pattern How can I do this without having to do it all individually. Many
thanks for any help.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default how do i shade all identical cells automatically

What do you mean by that, do you want to colour all cells with values that
are not unique? Assume the range is A1:G7, do format conditional
formatting, formulas is

=COUNTIF($A$1:$G$7,A1)1

click the format button and select a pattern, then click OK twice


--
Regards,

Peo Sjoblom

"eve" wrote in message
...
I want to shade all the identical cells in a large spread sheet to pick out
a
pattern How can I do this without having to do it all individually. Many
thanks for any help.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default how do i shade all identical cells automatically

eve

Use Conditional Formatting.

Select a range of cells, say A1:M100 then FormatCFFormula is

=IF(COUNTIF(A1:M1000, A1)1,TRUE,FALSE)

Pick a pattern and OK


Gord Dibben MS Excel MVP

On Thu, 3 May 2007 14:27:02 -0700, eve wrote:

I want to shade all the identical cells in a large spread sheet to pick out a
pattern How can I do this without having to do it all individually. Many
thanks for any help.


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
eve eve is offline
external usenet poster
 
Posts: 23
Default how do i shade all identical cells automatically

thank you for that but what I meant was that I want all the cells with A in
say in red, all the cells with B in say in blue etc etc. The spread sheet
is quite big so doing it individually will be a nightmare.

"eve" wrote:

I want to shade all the identical cells in a large spread sheet to pick out a
pattern How can I do this without having to do it all individually. Many
thanks for any help.

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default how do i shade all identical cells automatically

eve

This macro will do the trick.

Just add more nums and vals to cover etc., etc.

Sub foo()
Set r = Range("A1:M300")

vals = Array("A", "B", "C", "D", "E", "F", "G")
nums = Array(8, 9, 6, 3, 7, 4, 20) ' colorindex numbers
For Each rr In r
icolor = 0
For i = LBound(vals) To UBound(vals)
If UCase(rr.Value) = vals(i) Then
icolor = nums(i)
End If
Next
If icolor 0 Then
rr.Interior.ColorIndex = icolor
End If
Next
End Sub

To get a list of numbers for the color palette see David McRitchie's site or go
into the VBE and VBA help under "PatternColorIndex Property".


Gord

On Thu, 3 May 2007 23:19:01 -0700, eve wrote:

thank you for that but what I meant was that I want all the cells with A in
say in red, all the cells with B in say in blue etc etc. The spread sheet
is quite big so doing it individually will be a nightmare.

"eve" wrote:

I want to shade all the identical cells in a large spread sheet to pick out a
pattern How can I do this without having to do it all individually. Many
thanks for any help.


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
Formula that would highlight two identical cells.. Monk Excel Discussion (Misc queries) 5 April 24th 08 08:42 PM
In Excel-shade the cell automatically when data is entered Sandra Excel Discussion (Misc queries) 1 July 7th 06 02:16 PM
Let Excel shade every 3 line automatically BAase Excel Discussion (Misc queries) 11 May 23rd 05 03:49 AM
How can I shade every other row in Spreadsheet automatically? UABCSA Excel Discussion (Misc queries) 2 May 9th 05 04:51 PM
How do I automatically shade cells depending on data entered? Jim Johnson Excel Worksheet Functions 6 October 29th 04 07:01 PM


All times are GMT +1. The time now is 05:47 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"