Soma o Valor Da Célula de Acordo Com a Cor
-
Upload
diego-zwang -
Category
Documents
-
view
219 -
download
0
description
Transcript of Soma o Valor Da Célula de Acordo Com a Cor
SOMA4445697ESTA FRMULA SOMA TODOS OS NMEROS QUE ESTO EM VERMELHO2CASO MUDE A COR DE ALGUM NMERO PRESSIONE F9 PARA ATUALIZAR A SOMA624897267
Attribute VB_Name = "Plan1"Attribute VB_Base = "0{00020820-0000-0000-C000-000000000046}"Attribute VB_GlobalNameSpace = FalseAttribute VB_Creatable = FalseAttribute VB_PredeclaredId = TrueAttribute VB_Exposed = TrueAttribute VB_TemplateDerived = FalseAttribute VB_Customizable = True
Attribute VB_Name = "EstaPasta_de_trabalho"Attribute VB_Base = "0{00020819-0000-0000-C000-000000000046}"Attribute VB_GlobalNameSpace = FalseAttribute VB_Creatable = FalseAttribute VB_PredeclaredId = TrueAttribute VB_Exposed = TrueAttribute VB_TemplateDerived = FalseAttribute VB_Customizable = True
Attribute VB_Name = "Mdulo1"Function SOMAR(Interv As Range, Cor As Range) As DoubleDim A As Range, Soma As Double, Color As Integer Application.Volatile Color = Cor.Cells(1, 1).Interior.Color Soma = 0 On Error Resume Next For Each A In Interv.Cells If A.Font.Color = Color Then Soma = Soma + A.Value End If Next A
On Error GoTo 0
Set A = NothingSOMAR = Soma
End Function