Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 75
Default Coloring the duplicates with VBA

I would absolutely appreciate any help on the following

How can I color duplicates rows with random colors.
Duplicate are found by searching col A only. e.g a random color (e.g green)
is applied to all occurrence of word "Jane" in col A, then another random
color (e.g) red is applied to all occurrence of word "Jill" and so on.

The idea is visually to see duplicates.
Is this possible ?

Thanks a million for your help

I use XL 2002 on Win 2K
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Coloring the duplicates with VBA



--

HTH

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


"Bobby" wrote in message
...
I would absolutely appreciate any help on the following

How can I color duplicates rows with random colors.
Duplicate are found by searching col A only. e.g a random color (e.g

green)
is applied to all occurrence of word "Jane" in col A, then another random
color (e.g) red is applied to all occurrence of word "Jill" and so on.

The idea is visually to see duplicates.
Is this possible ?

Thanks a million for your help

I use XL 2002 on Win 2K



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Coloring the duplicates with VBA

Conditional formatting will identify duplicates, but if want random colours
you will need VBA.

--

HTH

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


"Bobby" wrote in message
...
I would absolutely appreciate any help on the following

How can I color duplicates rows with random colors.
Duplicate are found by searching col A only. e.g a random color (e.g

green)
is applied to all occurrence of word "Jane" in col A, then another random
color (e.g) red is applied to all occurrence of word "Jill" and so on.

The idea is visually to see duplicates.
Is this possible ?

Thanks a million for your help

I use XL 2002 on Win 2K



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 75
Default Coloring the duplicates with VBA

Hi Bob

Yes I was looking for a VBA solution only. Is it possible ?
Thanks

"Bob Phillips" wrote:

Conditional formatting will identify duplicates, but if want random colours
you will need VBA.

--

HTH

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


"Bobby" wrote in message
...
I would absolutely appreciate any help on the following

How can I color duplicates rows with random colors.
Duplicate are found by searching col A only. e.g a random color (e.g

green)
is applied to all occurrence of word "Jane" in col A, then another random
color (e.g) red is applied to all occurrence of word "Jill" and so on.

The idea is visually to see duplicates.
Is this possible ?

Thanks a million for your help

I use XL 2002 on Win 2K




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Coloring the duplicates with VBA

Bobby,

This is what I read that you want, but I have to say, I don't like it

Private Sub Worksheet_Change(ByVal Target As Range)
Dim cell As Range
Dim rng As Range

Set rng = Range("A1:A100")
Application.EnableEvents = False
On Error GoTo sub_exit
If Not Intersect(Target, rng) Is Nothing Then
With Target
For Each cell In rng
If WorksheetFunction.CountIf(rng, cell) 1 Then
cell.Interior.ColorIndex = Int(Rnd(1) * 56) + 1
End If
Next cell
End With
End If
sub_exit:
Application.EnableEvents = True
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.



--

HTH

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


"Bobby" wrote in message
...
Hi Bob

Yes I was looking for a VBA solution only. Is it possible ?
Thanks

"Bob Phillips" wrote:

Conditional formatting will identify duplicates, but if want random

colours
you will need VBA.

--

HTH

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


"Bobby" wrote in message
...
I would absolutely appreciate any help on the following

How can I color duplicates rows with random colors.
Duplicate are found by searching col A only. e.g a random color (e.g

green)
is applied to all occurrence of word "Jane" in col A, then another

random
color (e.g) red is applied to all occurrence of word "Jill" and so on.

The idea is visually to see duplicates.
Is this possible ?

Thanks a million for your help

I use XL 2002 on Win 2K








  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 75
Default Coloring the duplicates with VBA

Thank you so much, I'll give it a try

"Bobby" wrote:

Hi Bob

Yes I was looking for a VBA solution only. Is it possible ?
Thanks

"Bob Phillips" wrote:

Conditional formatting will identify duplicates, but if want random colours
you will need VBA.

--

HTH

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


"Bobby" wrote in message
...
I would absolutely appreciate any help on the following

How can I color duplicates rows with random colors.
Duplicate are found by searching col A only. e.g a random color (e.g

green)
is applied to all occurrence of word "Jane" in col A, then another random
color (e.g) red is applied to all occurrence of word "Jill" and so on.

The idea is visually to see duplicates.
Is this possible ?

Thanks a million for your help

I use XL 2002 on Win 2K




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
Coloring Elton Law[_2_] Excel Worksheet Functions 2 April 5th 10 03:22 PM
tab coloring rmstafford Excel Worksheet Functions 2 April 24th 07 01:08 AM
coloring issue TheKamel Excel Programming 1 November 16th 04 09:44 PM
Tab Coloring Todd Huttenstine Excel Programming 3 April 1st 04 07:26 PM
coloring a tab Jan Eikeland Excel Programming 4 December 18th 03 06:40 PM


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