View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ken Johnson Ken Johnson is offline
external usenet poster
 
Posts: 1,073
Default Smallest range on sheet containing non-blank cells?

Does anyone know of a quick VBA way of determining the smallest range
on the active sheet that contains all of the cells with data.
What I mean is:
Say the active sheet has data in only B4, F8 and H6; then the smallest
range containing these cells is B4:H8 and that is the range that I then
want to work with using the SpecialCells method.
I'm hoping I can avoid looping through an array of all the sheet's cell
values.
Any ideas or suggestions?
Ken Johnson