Borders are left where they are when cells are sorted; on the other hand, cell color and font features 'travel' with the data.
How can I force a cell to maintain its borders in a sort?
Borders are left where they are when cells are sorted; on the other hand, cell color and font features 'travel' with the data.
How can I force a cell to maintain its borders in a sort?
Perhaps the cell colour and font are a result of Conditional Formatting.
This isn't something I've come across. Perhaps you could post a sample workbook.
Regards
Trevor Shuttleworth - Retired Excel/VBA Consultant
I dream of a better world where chickens can cross the road without having their motives questioned
'Being unapologetic means never having to say you're sorry' John Cooper Clarke
The issue is not with cell color, font or conditional formatting.
Maybe it is just the way Excel is...I'm not sure. Let's say you start a blank worksheet and type some numbers in Column A, rows 1 through 5. Then, say, you select A4 and change the border to bold. (You can also use different fonts and colors on the other data).
When you effect a sort on the column, the numbers are ordered, but A4 remains bordered, even if its value is changed. The other data retain their fonts and colors wherever they go.
Why all this? I use border styles to highlight data in a sheet that is sorted differently at different times. (I could use color but the printer is a mono laser).
Is there a way in VB to make a cell retain its border in a sort?
I can confirm that it behaves exactly as you have stated.
I wasn't aware of this and I don't know if there's a way to make it behave differently.
I'm guessing there's an assumption that borders are meant to be in specific places as part of the design of the worksheet and people might be a tiny bit upset if their hard work was undone when they sorted their data.
Regards
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks