LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default Find red cell in macro

I have a "Find_Duplicates" macro that turns the fill color red for cells that
are a duplicate of the preceding row.

Now what I need is a macro that searches for these cells with the red fill
color. I tried to record the steps of the find and got:
With Application.FindFormat.Interior
.ColorIndex = 3
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
End With
Cells.Find(What:="", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:=False _
, SearchFormat:=True).Activate

This doesn't work as a macro. I get this error message:
Run-time error '91':
Object variable or With block variable not set.

And if I can get this "find" working, I need to know how to recover if there
is nothing to find.

I appreciate any help you can give me.
Thank you, Judy

 
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
macro to find the last blank cell in col. A peyman Excel Discussion (Misc queries) 16 September 17th 07 11:10 PM
I need a macro to find cut and paste data to new cell Rex Excel Discussion (Misc queries) 0 December 6th 04 12:23 AM
How to find speicial cell using macro blesswo Excel Programming 1 October 1st 04 02:11 PM
Macro to find blank cell Cutter[_9_] Excel Programming 2 July 6th 04 03:44 PM
macro to find out the last cell in a range vikram Excel Programming 1 April 30th 04 06:53 AM


All times are GMT +1. The time now is 04:15 AM.

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"