View Single Post
  #5   Report Post  
Dave Peterson
 
Posts: n/a
Default

I think you'd have to use the same rules to reapply the borders as you did when
you first applied the borders.

So if you add bottom/top borders between cells in adjacent rows that change
values, you could look for changes.

Jack Sons wrote:

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


--

Dave Peterson