View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
p45cal[_50_] p45cal[_50_] is offline
external usenet poster
 
Posts: 107
Default Sort Without Knowing Last Cell

"turned out to be the last cell with data in which is correct."
It is correct as far as that's what I said they'd be, but it isn't ideal to
use that range in
Range("E3:G3").End(xlDown).Sort _ ...
as you're letting excel guess what range should be sorted.

With Robert's code, I think you are sorting the entire column, right to the
bottom of the sheet, fine if there's nothing below, ever. But he did check
that aspect with you.

You close with "Thanks in Advance.", does that mean you're NOT sorted?
--
p45cal


"Paul Black" wrote:

Hi p45cal,

The selected cells as per your example for both the examples I gave
turned out to be the last cell with data in which is correct.

Hi Robert McCurdy,

My ranges do have headers in and I have adjusted my code accordingly,
thank you.

Thanks in Advance.
All the Best.
Paul