View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Peter Atherton Peter Atherton is offline
external usenet poster
 
Posts: 31
Default UsedRange problem

Andy

Try something like this

Range("B2).select 'place the activecell in the data area
ActiveCell.CurrentRegion.Select

This selects empty cells and headers

Regards
Peter

-----Original Message-----
Hi all

I used UsedRange from the ActiveSheet to loop through

each cell and process
data.

Sometimes I have blank rows inside my range. This works

fine with UsedRange.
Sometimes the first few rows are blanks and they must be

processed as well.
However, UsedRange does not pick them up.

I appreciate that this is the intended functionality of

the UsedRange. But
is it possible for UsedRange to be discriminatory and

exclude only the
trailing blank rows?

I cannot used a fixed range as the number of columns and

cells in my sheet
can be different for different files.
Any ideas?

Many thanks
Andy


.