+ Reply to Thread
Results 1 to 6 of 6

Sort without Changing Borders

  1. #1
    Registered User
    Join Date
    10-09-2020
    Location
    Tavares, FL USA
    MS-Off Ver
    2013
    Posts
    2

    Sort without Changing Borders

    My spreadsheet (sample attached) is sorted by Incident # (column B). Borders are applied so that when multiple rows have the same incident number, the only horizontal borders are the top of the first row and the bottom of the last row. When I later need to paste additional rows to the end, I re-sort the whole file after pasting. However, this keeps the borders in the same cells even though the order of the data has changed. I would like the borders to follow the data so that after the re-sort, the rows with the same incident number are still in the same box. I cannot figure out how to do this. I tried conditional formatting, but there is no rule that will always be true, so I could not figure out how to apply it to all situations.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,330

    Re: Sort without Changing Borders

    Please Login or Register  to view this content.
    With these two cf formulas
    Attached Files Attached Files
    Willem
    English is not my native language sorry for errors
    Please correct me if I'm completely wrong

  3. #3
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Sort without Changing Borders

    Except egminer said to format based on Incident which is in Column B. Similar formula applies
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  4. #4
    Registered User
    Join Date
    10-09-2020
    Location
    Tavares, FL USA
    MS-Off Ver
    2013
    Posts
    2

    Re: Sort without Changing Borders

    I can't get that formula to work for me even with changing the "C"s to "B"s.

  5. #5
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Sort without Changing Borders

    Hi

    Use tables. You can sort by any column. Use CF to format as desired
    Use in FC (second table) =$B16=$B17 (apply to all rows and in limits remove last line)
    See the file
    Attached Files Attached Files

  6. #6
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Sort without Changing Borders

    For A3:M12 (select this range)
    First, format cells> Borders and remove all horizontal borders
    Second, for top border
    Conditional Format> New Rule>Use Formula
    =$B3<>$B2 Format top border>OK
    Third, for bottom borders
    Conditional Format>New Rule > Use Formula
    =$B3<>$B4 Format bottom border > OK
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Custom Sort: cell contents move, borders do not
    By dwoodlives in forum Excel General
    Replies: 1
    Last Post: 05-25-2019, 10:33 AM
  2. [SOLVED] Changing cell background color/borders function
    By tigfur in forum Excel Programming / VBA / Macros
    Replies: 25
    Last Post: 04-16-2016, 06:22 AM
  3. [SOLVED] Changing Borders in Mac Excel 2011
    By Phil Hageman in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-16-2014, 09:23 AM
  4. Replies: 4
    Last Post: 11-20-2012, 06:00 PM
  5. Replies: 3
    Last Post: 03-12-2012, 02:28 PM
  6. Replies: 1
    Last Post: 07-22-2010, 08:39 AM
  7. [SOLVED] How do I keep borders from changing in page break preview?
    By ahp in forum Excel General
    Replies: 0
    Last Post: 11-21-2005, 03:25 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1