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

You are not describing what would have to be done.
You will have to either start from scratch each time using a macro,
possibly with a helper column also involved, or perhaps some
Conditional Formatting. You cannot make the sort do something
that it does not do. As stated before, if you do a lot of creative
cell border formatting you may cause trouble with

Cell styles in a workbook specification limit of 4,000

and you really don't want to make that happen.
---

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

"Jack Sons" wrote in message ...
Dave and David,

In principle I agree.

But I have to sort in a very large file of which many groups of cells that
belong together have a thick horizontal or vertical borderline in common,
like below (the vertical should be an uninterrupted line). As an exemple
this range could typically be something like A2503:H2558 with the horizontal
line above A2503:H2503 and the vertical line to the right of D2503:D2558.
In the sorting process the whole range A2503:H2503 has to be moved to
elsewhere (with the "lines") without leaviing a trace because its borders
will not correspond with the cells that wil take its place.

_________________________________
|
|
|
|


Any suggestions for code?

Jack.


"Jack Sons" schreef in bericht
...
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