+ Reply to Thread
Results 1 to 2 of 2

VBA to sort and keep Borders

  1. #1
    Forum Contributor
    Join Date
    12-05-2008
    Location
    Germany
    MS-Off Ver
    365
    Posts
    569

    VBA to sort and keep Borders

    Dear All,

    please have a look at the attached file.

    The task is to come up with a Macro that

    a) sorts the entries by column C, to that rows with "True" are top.
    b) keep the borders around the cells where names in column A are identical.

    It needs to be VBA because it is part of a larger project.

    Before:

    2022-08-12 17_26_20-Greenshot.jpg

    After:

    2022-08-12 17_27_23-Greenshot.jpg

    Thank you in advance!
    Attached Files Attached Files

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,486

    Re: VBA to sort and keep Borders

    Sorting for True would be no problem, but keeping the borders around duplicates, not as easy.

    Sorting does not move the cells , it moves the contents of the cells., borders would not move when sorting.

    Maybe consider conditional formatting to border around duplicates.

+ 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. Sort without Changing Borders
    By egminer in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-09-2020, 02:58 PM
  2. Custom Sort: cell contents move, borders do not
    By dwoodlives in forum Excel General
    Replies: 1
    Last Post: 05-25-2019, 10:33 AM
  3. Conditional Formatting row borders, eliminate Inside Borders within row
    By lizziemac in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-04-2018, 11:06 PM
  4. Replies: 2
    Last Post: 06-27-2017, 12:55 AM
  5. [SOLVED] Auto change borders to thick borders
    By Pierce Quality in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 11-22-2013, 11:17 PM
  6. Replies: 3
    Last Post: 03-12-2012, 02:28 PM
  7. Replies: 3
    Last Post: 02-20-2012, 05:09 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