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: 3
Default ERROR 91 with FIND in macro

I can't seem to get around a ERROR 91 message when I make a macro loop with a
FIND function.....any ideas on how to correct this sort of error would be
welcome. I know the data is present and I know it has to be just as it looks
rounded values will not work, I also know it can be part of the cell content.
I'm looking over a full sheet.

A good way to test this would be to place some number of RAND numbers within
a sheet and use the MIN function to find the least......use the FIND function
within a macro to find the least number and select and remove that so it
looks for the next higher value....repeat

Before responding please test your idea€¦.Ive been given over 100 bad ideas
to date, (with in 1 week)

As far as I can tell the FIND is looking for part of a string and I
understand the 91 ERROR to be some sort of SET value error.

The macro should look something like this with the data in sheet 1 and the
MIN function in sheet 2

Starting in sheet 2 active cell and ending in same.......recorded in relative

ActiveCell.Select
Selection.Copy
ActiveCell.Offset(1, 0).Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Sheets("Sheet1").Select
ActiveCell.Cells.Select
Selection.Find(What:="0.110937", After:=ActiveCell, LookIn:=xlValues, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
ActiveCell.Select
Application.CutCopyMode = False
Selection.ClearContents
Sheets("Sheet2").Select
ActiveCell.Offset(-1, 0).Range("A1").Select

 
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
Find Macro Error StillLearning Excel Discussion (Misc queries) 5 December 11th 09 06:58 PM
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable Enda80 Excel Worksheet Functions 1 May 3rd 08 02:35 PM
"Can't find macro" error JoAnn New Users to Excel 11 April 14th 08 05:06 PM
can't find error in macro logic... tehwa[_6_] Excel Programming 7 January 15th 04 06:27 AM
macro error "can't find project or library" Meinfs Excel Programming 3 September 14th 03 04:29 PM


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