Results 1 to 7 of 7

Automatically color-code cells in one sheet based on values matched from another sheet

Threaded View

  1. #1
    Registered User
    Join Date
    10-23-2023
    Location
    Stockholm, Sweden
    MS-Off Ver
    MS Windows 10 Enterprise. Excel for Microsoft 365 MSO (V.2302 Build 16.0.16130.20806) 32-bit
    Posts
    11

    Automatically color-code cells in one sheet based on values matched from another sheet

    I have a situation with color-shading certain cells in Excel which I hope someone in the Forum can help me with.

    I have three sheets in an excel file (attached).

    Sheet 1 ("Main Stats") contains the summary statistics of the number of insurance payments broken down by group, payment type (DC or DB) and agreement type. Note in the example, there are just 3 groups but in reality there are hundreds, as each group represents a different geographic area.

    Sheets 2 & 3 (called "Defined Contribution - DC" and "Defined Benefit - DB" respectively) contain the agreement types themselves, associated with each payment type.

    Note, that "DC" payments are colored in yellow in the Main Stats sheet, and "DB" payments are in green -- both which I've done manually for this example.

    My goal: I want to be able to display the agreement stats associated with each payment type using the color found in the DC or DB sheets, but automatically instead of manually.

    Is there a way using VBA on "Main Stats" to programmatically look at the agreement type in cols B through G from Row 6 on down,
    and, after matching it with appropriate Payment type sheet (DC or DB), apply the correct color to these cells?

    Any help, hints or advice would be much appreciated.

    Jeff
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Automatically change sheet tab color based on sheet name
    By tmcwade in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-14-2023, 02:30 PM
  2. [SOLVED] split data into two sheets matched & not matched based on matching sheet
    By abdo meghari in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 03-31-2022, 02:24 PM
  3. Sheet tab color update based of range on values on sheet 1
    By Prascena in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-11-2021, 10:37 AM
  4. [SOLVED] Vba code to color text in sheet 1 based on key words present in next sheet.
    By sapnawat in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-17-2018, 04:26 AM
  5. Automatically sort cells in one sheet based on values in another
    By tubells in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 03-10-2016, 12:24 PM
  6. [SOLVED] Dynamically color cell on Summary sheet based on column values on data sheet
    By drewship in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 01-08-2016, 12:59 PM
  7. Change cell colour, based on matched cells in sheet 2
    By Bobbo Jones in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-14-2013, 02:27 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