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
Bookmarks