Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default The Find Method

Thank you both for the assistance, I appreciate it.

-Brad

-----Original Message-----
How about this:

Option Explicit
Sub testme01()

Dim rngRacf As Range
Dim strMaxRange As String
Dim rngBottomZero As Range

strMaxRange = 33

With Worksheets("Inquiries")
Set rngRacf = .Range("C2:C" & strMaxRange)

With rngRacf
Set rngBottomZero = .Find(what:="0000", _
After:=.Cells(1), _
LookIn:=xlValues, _
SearchDirection:=xlPrevious)
End With

If rngBottomZero Is Nothing Then
'not found
Else
.Cells(rngBottomZero.Row, "A").Resize(1,

7).Copy _
Destination:=Worksheets("sheet1").Range

("a1")
End If
End With

End Sub

I start in the firstcell of the rngRacf, but look up

(xlprevious).

The only problem I had was what "0000" really was. If I

put '0000 (as text), I
found it. If I put 0 and left it formatted as general,

xl didn't find it.

but if I gave that a custom format of "0000" w/o the

quotes, it got found.




Brad wrote:

Good afternoon,

I'm completely stumped here. What I need is to find a
certain value, by searching from the bottom of the
spreadsheet in a single column. Then take that cell
location of where the value is found, and cut (from cut
and paste) columns A - G and paste them in another
worksheet that I created.

Set rngRacf = Worksheets("Inquiries").Range("C2:" &
strMaxRange)
Set rngBottomZero = rngRacf.Find(
What:="0000", _
After:=strMaxRange, _
LookIn:=xlValues, _
SearchDirection:=xlPrevious)

strMaxRange is the second to last cell value that has
data. Assuming that the "After" designation will begin
the search in the very last cell, searching backwards

for
an instance of the value "0000" that I'm searching for.

I want rngBottomZero to have the cell location where the
criteria is found. If I just use a variant "BottomZero"
the data that I get back is just the "0000" value it
searched for. In this particular code I receive "Unable
to get the Find property of the range class." Which is
even more confusing to me because I thought Find was a
method, not a property. But I'm not sure how to

designate
it otherwise.

I'm numb from troubleshooting and I'm getting nowhere.
Any help would be greatly appreciated.

-Brad


--

Dave Peterson

.

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
Set range with Find method jlclyde Excel Discussion (Misc queries) 1 December 3rd 08 05:44 PM
Find Method problem in Excel VBA.... Irmann Excel Worksheet Functions 7 March 10th 08 03:49 AM
How do you find the method of selected points? method of selected points Setting up and Configuration of Excel 0 November 2nd 05 03:02 PM
How to find method to cut steel coil by using excel. vn Excel Worksheet Functions 1 May 31st 05 03:19 AM
The Find Method Dick Kusleika Excel Programming 3 July 16th 03 07:59 PM


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