Mapa com cores geradas automaticamente

Fiath

Power Member
Boa tarde,

Precisava de construir um mapa em que as cores sejam alteradas automáticamente com base numa escala.

Ex: No distrito de Lisboa vendi X items a cor do distrito no mapa fica verde

Tenho a base em Excel 2007 que atualizO diáriamente e tenho o mapa dividido em JPEG mas não consigo alterar a cor baseado numa célula, talvez com macros?

Não sei se postei no sitio certo do forum.

Obrigado :)
 
Encontrei esta macro:

Sub teste()

ActiveSheet.Shapes.Range(Array("Castelo Branco")).Select
If Selection.ShapeRange.Fill.Visible = msoFalse Then
Selection.ShapeRange.Fill.Visible = msoTrue
Selection.ShapeRange.Fill.ForeColor.RGB = RGB(255, 255, 0)
Selection.ShapeRange.Fill.Transparency = 0
Selection.ShapeRange.Fill.Solid
Else: Selection.ShapeRange.Fill.Visible = msoTrue
Selection.ShapeRange.Fill.Visible = msoFalse
End If

If Selection.ShapeRange.Fill.Visible = msoTrue Then
Selection.ShapeRange.Fill.Visible = msoFalse
Else: Selection.ShapeRange.Fill.Visible = msoFalse
Selection.ShapeRange.Fill.Visible = msoTrue
Selection.ShapeRange.Fill.ForeColor.RGB = RGB(255, 255, 0)
Selection.ShapeRange.Fill.Transparency = 0
Selection.ShapeRange.Fill.Solid
End If

End Sub

Alguem sabe como inserir 3 condições para mudar a cor:

Ex: >100 - verde
Entre 50 e 99 amarelo
<50 vermelho

Obrigado.
 
Back
Topo