title: Maps in Excel: How can you highlight a geographic area by selecting its name from a dropdown menu?
body: <p>The goal is to select a state name from a dropdown list in Excel, and have that state change color on a map of the U.S. also in Excel. I have created the map, and set up all the reference tables as I thought was needed, but it isn't working. The most helpful source I have found online is this one <a href="https://www.youtube.com/watch?v=RfjCkHK2TXM" rel="nofollow noreferrer">https://www.youtube.com/watch?v=RfjCkHK2TXM</a>. To note, I'm working from a Mac, and using an Excel version 16.4. Unlike the video, I did not draw the boundaries around the states, but instead selected each state from a map and labeled them with the state's name.</p>
  <p>This is the macros code I used:</p>
  <pre><code>Sub Shading()
  
  
      For i = 2 To 53
      Range(&quot;actReg&quot;).Value = Range(&quot;Data!A&quot; &amp; i).Value
      ActiveSheet.Shapes(Range(&quot;actReg&quot;).Value).Select
      Selection.ShapeRange.Fill.ForeColor.RGB = Range(Range(&quot;actRegCode&quot;).Value).Interior.Color
  
      Next i
  
  
      Range(&quot;A6&quot;).Select
  End Sub
  </code></pre>
  <p>Thank you for any insights into how to make this work!</p>