Thread: Sort by rows...
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Sort by rows...

Dim rng as Range
set rng = Range("A1",Cells(1,256).End(xltoLeft))
msgbox Rng.Address

--
Regards,
Tom Ogilvy


"Darin Kramer" wrote in message
...

Hi there,

I got data in columns a onwards (could go up to AZ, and any variable
number of columns between a and az)I need VB to
to sort the data by ROWS, and basic VB seems to sort the data fine
however I loose the cell formatting (border) of the sorted data.
Does anyone have some VB to do the above and maintain the cell
formatting.?

Alternatively, I could copy and paste the cell formatting from another
sheet, (say column A in sheet B) and paste formatting over the existing
data in my original sheet, but I need to then find last column with data
in it (ie from column A how do I find last column with data in it, and
then select column A up to and including that last column...?)

Thanks!!!!!

Darin

*** Sent via Developersdex http://www.developersdex.com ***