+ Reply to Thread
Results 1 to 9 of 9

How do I copy Conditional Formatting Heat Map color to Adjacent Text Cells?

Hybrid View

  1. #1
    Registered User
    Join Date
    11-20-2007
    Location
    Menlo Park, CA
    MS-Off Ver
    Office 2019 Pro Plus
    Posts
    33

    How do I copy Conditional Formatting Heat Map color to Adjacent Text Cells?

    Column A has Description
    Column B has Numeric Values

    I select Numeric Values, Conditional Formatting>Color Scales> (Then select first scale).
    This applies the heat mapping color to my numeric values.

    I would like the cells in column A to match that of its adjacent cell in column B.
    What's the best/easiest way to do this?

    Thanks!

  2. #2
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.96 for Mac MS 365
    Posts
    8,693

    Re: How do I copy Conditional Formatting Heat Map color to Adjacent Text Cells?

    have you tried the format painter? (little paint brush under the home tab)
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  3. #3
    Registered User
    Join Date
    11-20-2007
    Location
    Menlo Park, CA
    MS-Off Ver
    Office 2019 Pro Plus
    Posts
    33

    Re: How do I copy Conditional Formatting Heat Map color to Adjacent Text Cells?

    Yes, that copies the conditional formatting, which would colorize the cells based on their numerical cell value order. Since it is text, it does not do anything for coloring.
    I've seen copying cells to Word Document, then copying from word document back to excel. This removes conditional format keeping the cell color. Looking for a more elegant solution.

    Perhaps modifying the conditional formatting to include adjacent cell? or maybe VBA to copy conditional formatting color and paste as regular cell color?
    Last edited by ImpetuousRacer; 05-01-2019 at 02:14 PM.

  4. #4
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.96 for Mac MS 365
    Posts
    8,693

    Re: How do I copy Conditional Formatting Heat Map color to Adjacent Text Cells?

    thought I'd give it a shot, I don't use the heat mapping feature so I wasn't sure.

  5. #5
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,973

    Re: How do I copy Conditional Formatting Heat Map color to Adjacent Text Cells?

    In short you can't directly do it through method described.

    There are number of workarounds.

    1. Create 5 separate CF using formula. You can use hard coded value, or use separate Percentile lookup table for this.
    2. Use vba to replicate cells.DisplayFormat.Interior.ColorIndex from column b to column a's cells.Interior.ColorIndex.

    See attached for method 1.
    Attached Files Attached Files
    "Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something."
    ― Robert A. Heinlein

  6. #6
    Registered User
    Join Date
    11-20-2007
    Location
    Menlo Park, CA
    MS-Off Ver
    Office 2019 Pro Plus
    Posts
    33

    Re: How do I copy Conditional Formatting Heat Map color to Adjacent Text Cells?

    I like the sounds of Method 2. Do you have a VBA code I could use? Thanks for all the help!

  7. #7
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,973

    Re: How do I copy Conditional Formatting Heat Map color to Adjacent Text Cells?

    What version of Excel do you use? I'd recommend updating your profile with your version.
    .DisplayFormat property is only available for Excel 2010 and later only.

    Something like below as an example: I used Interior.Color, instead of .ColorIndex, as I noticed that some DiplayFormat's ColorIndex not being same on Cell's ColorIndex.
    Sub Demo()
    Dim cel As Range
    For Each cel In Range("B2:B" & Cells(Rows.Count, "B").End(xlUp).Row).Cells
        cel.Offset(, -1).Interior.Color = cel.DisplayFormat.Interior.Color
    Next
    End Sub

  8. #8
    Registered User
    Join Date
    11-20-2007
    Location
    Menlo Park, CA
    MS-Off Ver
    Office 2019 Pro Plus
    Posts
    33

    Re: How do I copy Conditional Formatting Heat Map color to Adjacent Text Cells?

    Thanks, that worked.

    I'm working with a multitude of cells through workbooks and sheets.
    The offset would always -1, but is there a way for the selection to be dynamic based on selected cells?
    If not, this works great!

    I have updated my profile. Using 2013 (work) & 2019 (home).

    Thanks!
    Last edited by ImpetuousRacer; 05-01-2019 at 05:44 PM.

  9. #9
    Registered User
    Join Date
    12-02-2021
    Location
    Asia
    MS-Off Ver
    365
    Posts
    1

    Re: How do I copy Conditional Formatting Heat Map color to Adjacent Text Cells?

    Quite tricky method, but I found it was working in my office365:

    ->Copy the heat-map generated table from excel to power-point,
    ->it will convert the number and color as it is, not conditional formating (heatmap) anymore.
    ->Then you go back from powerpoint to excel, copy and paste in excel.
    the cells are now colored as the heatmap-color, but not as conditional formatting.
    ->Then you can put text instead of numbers in there without affecting the color anymore.

    I hope it works for you!
    Have a good day today!!

+ 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. Replies: 0
    Last Post: 09-08-2016, 09:52 AM
  2. Replies: 3
    Last Post: 05-30-2014, 10:24 AM
  3. How to Color adjacent cells wehn using conditional formatting
    By andyfly33 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-18-2013, 10:29 AM
  4. Conditional formatting to color text cell that represent data cells
    By dorkichar in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-10-2013, 06:38 PM
  5. [SOLVED] Conditional Formatting (changing color) in one cell based on text in two cells
    By Chadyoung1 in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 02-14-2013, 04:26 AM
  6. Conditional Formatting - Heat Map
    By John Bates in forum Excel General
    Replies: 2
    Last Post: 04-14-2009, 03:46 PM
  7. Conditional formatting of adjacent cells based on text in cell
    By elderain@gmail.com in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-07-2006, 07:20 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