+ Reply to Thread
Results 1 to 4 of 4

Change Font Color on Selection within Named Range

  1. #1
    Forum Contributor
    Join Date
    12-19-2011
    Location
    Central Europe
    MS-Off Ver
    Excel O365
    Posts
    361

    Change Font Color on Selection within Named Range

    Hi all

    In my file, I have named the col. Q as "MyRange1"

    The user has to select one or more lines within this file and run a macro
    This macro re-colors the cells.
    However, I would like the cells in col. Q (cells within "MyRange1") to be colored differently.

    How would I achive this?

    (Adding a separate line of code simply re-coloring Q is not practical, as there are many more named ranges, and cols might shift at any time)

    Thanks
    FD

  2. #2
    Valued Forum Contributor
    Join Date
    10-05-2014
    Location
    Regina, SK Canada
    MS-Off Ver
    Excel for Mac 11
    Posts
    330

    Re: Change Font Color on Selection within Named Range

    Try this: (Change the colours to ones you like)

    Please Login or Register  to view this content.
    Last edited by StuCram; 09-29-2015 at 12:14 PM.
    If this has been helpful, please click on the star at the left.

  3. #3
    Forum Contributor
    Join Date
    12-19-2011
    Location
    Central Europe
    MS-Off Ver
    Excel O365
    Posts
    361

    Re: Change Font Color on Selection within Named Range

    Hi there.
    Thank you very much, this helped

    Is there a particular reason why you use two lines of code in this section

    Please Login or Register  to view this content.
    I have re-coded it to

    Please Login or Register  to view this content.
    Just curious and for future reference.

  4. #4
    Valued Forum Contributor
    Join Date
    10-05-2014
    Location
    Regina, SK Canada
    MS-Off Ver
    Excel for Mac 11
    Posts
    330

    Re: Change Font Color on Selection within Named Range

    I usually do that in case there other lines of code to add that would affect the range, perhaps adding a border or changing the text style.
    Just my habit.

+ 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. Change Row Font Color based on criteria in named range
    By DoodlesMama in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-22-2013, 07:44 PM
  2. Replies: 2
    Last Post: 02-04-2013, 02:00 PM
  3. Change a range to a named selection
    By The Dropper in forum Excel General
    Replies: 2
    Last Post: 04-09-2010, 05:26 PM
  4. I need a formula or macro to change font color for each cell in range
    By gioithe in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-12-2009, 04:30 PM
  5. Change Font Color in a Range based on One Cells information
    By mrgillus in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 07-28-2009, 11:58 AM
  6. [SOLVED] change font color if number Range changes
    By Moses in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-26-2006, 02:40 PM
  7. [SOLVED] Change color of font base on time range
    By deathzorro in forum Excel General
    Replies: 2
    Last Post: 01-10-2006, 04:10 AM

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