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: 20
Default VBA: How do I find a value within a selected range?

I have declared a range in a prior statement, selected that range, and now
want to find a value within that range. For some reason, the program is
looking outside of that range. What am I doing wrong?

With ActiveCell
Set range1 = Range(ActiveCell, .Offset(100, 0))
End With

Range(range1.Address).Select

Cells.Find(What:=Location, After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate


 
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 the last cell in a selected range? J@Y Excel Programming 6 June 15th 07 07:25 PM
Find last row and column in a selected range Bernie Deitrick Excel Programming 0 December 20th 06 02:41 PM
Macro to find empty cell and select range to print selected. [email protected] Excel Programming 1 May 15th 06 09:05 AM
Find Findnext in selected range looloo[_2_] Excel Programming 2 January 25th 05 06:51 PM
how to find last row/col index within a selected range Jeff Excel Programming 2 October 6th 04 03:58 PM


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