View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JNW JNW is offline
external usenet poster
 
Posts: 480
Default Find in a dynamic column...

replace
range("a1:a1000")

with
range(levelrng.range("a1"),levelrng.range("a65536" ).end(xlup))
--
JNW


"billboe" wrote:

I know this is a stupid question and I'm sorry in advance!!!

Set ytdRng = LevelRng.Range("a1:a1000").Find(What:=prevName, _
LookIn:=xlValues, LookAt:=xlWhole, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False)


LevelRng is a range that points to the first cell in the column I want
to search... How do I have it search the whole column? I currently
have it searching a fixed range ("a1:a1000") and that works, but I'd
like it to just search to the bottom of the used cells in that column.
FYI, there are blank cells in the column...

Thanks,

Bill