Hello, new to the forum (and to VBA in general).
I'm working on building a tool in Excel that dynamically changes the fill color of each state in a US map, based on values in another sheet. It basically works by finding each state name and value, returning the fill color in the cell one column to the right, and applying that fill color to the appropriate state in the map.
It has been working off and on, but recently broke for no apparent reason. I now receive a 1004 Error (Unable to get the Match property of the WorksheetFunction class).
I have one piece of code (functioning properly) that changes the fill color depending on the value of the cell (which in this case is a percentile):
The second piece of code, which actually populates the colors in the map, looks like this:
Where STATES_VISITS, and STATE_COLORS_VISITS are named ranges in Excel. I'm getting the error in the following line:
I've also attached the full excel file in case that helps. HUGE thank you to anyone who can help shed some light on this!
-Chris
Bookmarks