View Single Post
  #3   Report Post  
David McRitchie
 
Posts: n/a
Default

I agree with Dave Paterson, but I'd really suggest some other choices.

There are eight borders around a cell (inside and outside), as you already
mentioned the cell borders remain in place when sorting, it would be
impossible for Excel to know how borders are the interact with other
borders if it tried to keep them intact. (pretty picture...)
http://www.mvps.org/dmcritchie/excel/sorting.htm

Each combination of formatting attributes counts toward a limit so
you really don't want to mess with borders if you an help it, keep
them all the same color.

Would suggest you use another means to differentiate your cells
such as Bold, font color, Interior color. If you are already using
all of those things you probably have a very active worksheet, and
might want to tone it down. There is also pattern shading but I find that
very hard to read, and having a laptop almost definitely exasperates
any problems with coloring. Don't forget about Conditional Formatting
http://www.mvps.org/dmcritchie/excel/condfmt.htm
in fact you can change the borders with C.F.
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Dave Peterson" wrote in message ...
Instead of trying to keep the existing borders, could you remove the borders and
reapply?

I would think that this would be more straightforward (er, pronounced easier).

Jack Sons wrote:

Hi all,

When I sort a column the order of cells will be rearranged, see this code:
Worksheets("TRY").Columns("A:C").Sort Key1:=Range("C1"),
Order1:=xlAscending, Header:=xlGuess, OrderCustom:=1, MatchCase:=False,
Orientation:=xlTopToBottom ', _
'DataOption1:=xlSortNormal.
All cell details will go to the new place of the cell, like value, text
color, italic, bold etc. and even fill color, but not the cell borders.

I really need code to sort with which also the cell borders will change
place, I mean they will "stick" to the cell content, so

1
2
3

will result in

3
2
1
Your help will be appreciated.

Jack Sons
The Netherlands


--

Dave Peterson