View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.programming
Paul Black Paul Black is offline
external usenet poster
 
Posts: 394
Default Sort Without Knowing Last Cell

Hi p45cal,

Nice play on words, I like it.
How would I incorporate your code into mine to get the optimum effect
please.
Do I need to set a variable up or something.

Thanks in Advance.
All the Best.
Paul

On Aug 31, 1:40 pm, p45cal wrote:
"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- Hide quoted text -


- Show quoted text -