View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Rowan Drummond[_3_] Rowan Drummond[_3_] is offline
external usenet poster
 
Posts: 414
Default how to subtract a range from another?

I guess it would search the whole range. An alternative would be:

Dim eRow As Long
Dim rng As Range
eRow = Cells(Rows.Count, 1).End(xlUp).Row
If eRow 4 Then
Set rng = Range(Cells(5, 1), Cells(eRow, 1))
MsgBox rng.Address
End If

Regards
Rowan

serdar wrote:
thats ok.when i use this range as:

rng.Find(x, LookIn:=xlValues)

all 65536 cell are searched? or just searches until the last used/formatted?


"Rowan Drummond" , haber iletisinde sunlari
...

One way:

Dim c As Range
Set rng = Range(Cells(5, 1), Cells(Rows.Count, 1))
MsgBox rng.Address

Hope this helps
Rowan

serdar wrote:

say i wanna set a range of an entire column "minus" first 4 rows. How to
do this in VBA?