+ Reply to Thread
Results 1 to 5 of 5

Sort Sections Based on Color of Font

  1. #1
    Forum Contributor
    Join Date
    05-16-2007
    Location
    USA
    MS-Off Ver
    MS Office 2016, Excel 2016
    Posts
    206

    Sort Sections Based on Color of Font

    I'm not using a heading style, but for each section, what should be a heading is formatted with the red font. Can I use that red font as a reference to sort all the sections?

    Each section starts with 1st or 2nd or 3rd or 4th or 5th, and they are all in the red font. I would like to simply sort them so all the sections are grouped together under their relevant position.

    Currently, they're all randomly placed, like 3rd, then a 1st, then maybe a 3rd again, etc.

    Is this possible or would I need to convert them first to actual Headings? And if this is required, since they're all using the red font, is there a way to select them based on the red font automatically, and then convert them quickly?

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,604

    Re: Sort Sections Based on Color of Font

    We could try guessing what your data actually looks like, but it would be better if you attached a sample Excel workbook so we could see for ourselves. See the yellow banner at the top of the screen for details of how to do this.

    Pete

  3. #3
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: Sort Sections Based on Color of Font

    Quote Originally Posted by Pete_UK View Post
    it would be better if you attached a sample Excel workbook so we could see for ourselves.
    It'd probably bet better if the OP attached a Word document...
    Cheers,
    Paul Edstein
    [Fmr MS MVP - Word]

  4. #4
    Forum Contributor
    Join Date
    05-16-2007
    Location
    USA
    MS-Off Ver
    MS Office 2016, Excel 2016
    Posts
    206

    Re: Sort Sections Based on Color of Font

    Quote Originally Posted by Pete_UK View Post
    We could try guessing what your data actually looks like, but it would be better if you attached a sample Excel workbook so we could see for ourselves. See the yellow banner at the top of the screen for details of how to do this.

    Pete
    Sure! BTW it's a Word document, not an Excel workbook. You made me double check myself that I put it under the correct forum

    It is attached! Thank you!
    Attached Files Attached Files

  5. #5
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: Sort Sections Based on Color of Font

    Quote Originally Posted by Modify_inc View Post
    You made me double check myself that I put it under the correct forum
    Strictly speaking, you didn't - it should have been posted in: https://www.excelforum.com/word-programming-vba-macros/

    No matter. Try, for example:
    Please Login or Register  to view this content.
    Note: The above code leaves your headings with the 'Heading 1' Style applied. Additional code could be used to undo that, but it doesn't seem necessary.
    Last edited by macropod; 12-13-2020 at 07:01 PM.

+ 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. [SOLVED] Sort range by alpha and then by font color with VBA
    By ChrisXcel in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-31-2014, 10:31 AM
  2. Sort Different sections based on values in a column
    By thelegazy in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-26-2013, 02:28 AM
  3. Change font color based on font color of another cell
    By Ibyers in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2012, 09:36 AM
  4. Sort by font Color
    By Laslo1 in forum Excel General
    Replies: 9
    Last Post: 03-08-2012, 07:37 PM
  5. Sort a column based on Font Color
    By tdyl1969 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-16-2010, 11:30 AM
  6. sort cells by font color
    By baz0912 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-25-2008, 02:09 PM
  7. Sort or sub-total by Fill color or font color
    By Excel_seek_help in forum Excel General
    Replies: 1
    Last Post: 04-27-2006, 04:10 PM

Tags for this Thread

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