+ Reply to Thread
Results 1 to 7 of 7

Color letter with color from legend

  1. #1
    Registered User
    Join Date
    09-16-2019
    Location
    Italy
    MS-Off Ver
    2016
    Posts
    48

    Color letter with color from legend

    Hello everyone.
    I have a small table with some letters and with their background color, what i want is :
    In a range of cells, if i write one of the letters of the table, automatically the background color of that cell changes. All this in VBA of course.
    Here a sample file :
    Attached Files Attached Files

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,858

    Re: Color letter with color from legend

    Please Login or Register  to view this content.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    09-16-2019
    Location
    Italy
    MS-Off Ver
    2016
    Posts
    48

    Re: Color letter with color from legend

    Yeah it works, nice!
    But i would prefer if all this were done io a for loop, is it possible?

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,858

    Re: Color letter with color from legend

    Don't understand. Is the data already added and you need to run this once? In your original post you indicate you wish to update as you enter data. This would preclude a loop. Which is it.

  5. #5
    Registered User
    Join Date
    09-16-2019
    Location
    Italy
    MS-Off Ver
    2016
    Posts
    48

    Re: Color letter with color from legend

    No. But now i have a solution that works :

    Please Login or Register  to view this content.
    What do you think about this Alansidman?

  6. #6
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,858

    Re: Color letter with color from legend

    If it works, then it is ok with me. You are the one that has to work with it.

  7. #7
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,408

    Re: Color letter with color from legend

    Why didn't you ask this question in the thread you started earlier here...

    https://www.excelforum.com/excel-pro...-on-cells.html

    If you had, I would have told you the solution I gave you there (which you said worked) only needed a minor change (shown in red below) to accommodate your new target range...
    Please Login or Register  to view this content.
    Note: This code as well as the code I gave you originally allows you to copy/paste values into more than one cell within the target range.

+ 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. How to creat multi color bar legend
    By shs91 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 03-29-2016, 06:23 PM
  2. [SOLVED] Why does this macro color the series on the chart but not the legend, for non-pie charts?
    By tahi.laci in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-08-2015, 07:20 AM
  3. Replies: 1
    Last Post: 10-30-2015, 01:39 PM
  4. How to make legend color consistent across graphs?
    By Mirisage in forum Excel General
    Replies: 5
    Last Post: 07-28-2015, 10:40 PM
  5. Replies: 4
    Last Post: 12-29-2013, 11:41 PM
  6. Set chart series color to match series legend entries font color
    By Equipoise in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-03-2013, 07:33 AM
  7. Replies: 0
    Last Post: 06-07-2012, 11:09 AM

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