View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
NikkoW NikkoW is offline
external usenet poster
 
Posts: 9
Default Another last cell detection problem

I have 6 columns of data. I need to find the bottom, right-most cell (I
don't know what row that is since it changes from worksheet to worksheet)
and then select the whole area from A4 to this last cell.

The problem is that there is no guarantee that all cells will have data in
them (so the x1end command will stop before reaching my desired cell). Well,
to be precise, columns A, B and C are all populated but D, E and F only have
intermittent entries.

Once I have that range, I need to use it in a

Range(MyRange).AdvancedFilter Action:=xlFilterInPlace, Unique:=True

Instruction so I need to assign this changing area to a variable, MyRange.

Thanks in advance