Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro Which Highlights Rows That Contain Identical First Cells


Does anyone know of or can write a macro which will highlight the entire
row of cells in which the values in A column are identical / repeats.

What I need is this, for example:

aaaa bbbb bbbb bbbb
aaaa dddd dddd dddd
aaaa cccc cccc cccc
1111 1111 1111 1111
mmmm xxxx xxxx xxxx
mmmm tttt tttt tttt
9999 9999 9999 9999
yyyy hhhh hhhh hhhh
yyyy iiii iiii iiii
0000 0000 0000 0000
ssss mnjk zzzz dddd
ssss fdfc ftgy edsw

Leaving me:

Thus the rows which contain 'aaaa', 'mmmm', 'yyyy', 'ssss' will be
highlighted because the values in Column A are identical to each other.


(Note, the highlight can all be one color, even though, for example:
'aaaa' and 'mmmm' are not identical values.


I don't know how to write macros at all and wasn't able to find one
that does this. I am eternally grateful or any help that can be
provided.


--
luu980
------------------------------------------------------------------------
luu980's Profile: http://www.excelforum.com/member.php...fo&userid=6931
View this thread: http://www.excelforum.com/showthread...hreadid=532911

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro Which Highlights Rows That Contain Identical First Cells


Ah ha! I found the solution!!:

The Duplicate Master
http://members.iinet.net.au/~brettdj/


This thing does everything I need and more!!!


--
luu980
------------------------------------------------------------------------
luu980's Profile: http://www.excelforum.com/member.php...fo&userid=6931
View this thread: http://www.excelforum.com/showthread...hreadid=532911

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Macro Which Highlights Rows That Contain Identical First Cells

Select cell A2. then click on the row 2 label on the left of the worksheet
(to the left of column 1). Then hold down the shift key and go to the last
row you want to have this behavior and click on that row label. Assume that
is row 100. Now row 2:100 are selected Make sure A2is the ActiveCell.

Now go to format=conditional formatting

In the dialog, change the "Cell Value Is" dropdown to "formula is"
in the formula box put in
=AND($A2=$A3,$A2<"")
then click formatting and select the color from the pattern tab.

Now click Add
Again, change to "Formula Is" and put in a formula like

=AND($A2=$A1,$A2<"")

click the format button and select your color from the pattern tab.

no OK you way out.

If row1 is to be include as well, then select row1 alone with A1 as the
active cell and put in a formula like

=AND($A1=$A2,$A1<"")

with appropriate formatting

--
Regards,
Tom Ogilvy





"luu980" wrote:


Does anyone know of or can write a macro which will highlight the entire
row of cells in which the values in A column are identical / repeats.

What I need is this, for example:

aaaa bbbb bbbb bbbb
aaaa dddd dddd dddd
aaaa cccc cccc cccc
1111 1111 1111 1111
mmmm xxxx xxxx xxxx
mmmm tttt tttt tttt
9999 9999 9999 9999
yyyy hhhh hhhh hhhh
yyyy iiii iiii iiii
0000 0000 0000 0000
ssss mnjk zzzz dddd
ssss fdfc ftgy edsw

Leaving me:

Thus the rows which contain 'aaaa', 'mmmm', 'yyyy', 'ssss' will be
highlighted because the values in Column A are identical to each other.


(Note, the highlight can all be one color, even though, for example:
'aaaa' and 'mmmm' are not identical values.


I don't know how to write macros at all and wasn't able to find one
that does this. I am eternally grateful or any help that can be
provided.


--
luu980
------------------------------------------------------------------------
luu980's Profile: http://www.excelforum.com/member.php...fo&userid=6931
View this thread: http://www.excelforum.com/showthread...hreadid=532911


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro Which Highlights Rows That Contain Identical First Cells


Hi Tom,

I just tried out your solution. Works like a charm!!! Thank you very
much!!!


--
luu980
------------------------------------------------------------------------
luu980's Profile: http://www.excelforum.com/member.php...fo&userid=6931
View this thread: http://www.excelforum.com/showthread...hreadid=532911



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
Cursor highlights the wrong rows in excel? Splashdown Excel Discussion (Misc queries) 0 March 30th 10 03:24 PM
Mouse locks up and highlights cells Ian@DSL[_2_] Excel Discussion (Misc queries) 3 September 24th 07 02:08 PM
Linking cells with colors or highlights Bill Excel Discussion (Misc queries) 1 April 27th 06 03:31 AM
one cell's value Highlights selected cells....how? [email protected] Excel Discussion (Misc queries) 2 February 15th 06 09:39 AM
moving mouse highlights cells. why? brentb Excel Discussion (Misc queries) 1 January 17th 05 05:34 PM


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