VBA code to change object color based on value of another excel 2010

lwthomp80

New Member
Joined
Oct 7, 2013
Messages
17
Good morning, I am trying to create a heat map of the US that changes the shade of each state based on the values in another table range (B1:F45). There are 6 "tiers" of shade for each range of values:

0RGB(255,255,255)
1-140
RGB(235,241,222)
141-280RGB(216,228,188)
281-420RGB(196,215,155)
421-560RGB(118,147,60)
561-700RGB(79,98,40)

<colgroup><col><col></colgroup><tbody>
</tbody>

I have created three tables. The first connects the state abbreviation to the shape of the object/state. The second connects the abbreviation of the state to the values that will change. The third changes the connects the value to the color scheme that I want to be reflected based on each value.

This third table is where I am having the difficulty. I created my spreadsheet based on the tutorial in this link but the link in the "MapValuetoColor" table that contains the connecting RGB code to the objects is broken and I do not know what to do next.

I am a VBA novice which is causing me a difficult time figuring out how to get these objects to changed based on the values in the table. Can anyone help me to determine how to get the states to change based on this criteria? Thank you in advance.
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!

Forum statistics

Threads
1,214,652
Messages
6,120,746
Members
448,989
Latest member
mariah3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top