Excel planilha vba macros soma coluna wkf

Ter, 16 de Agosto de 2011 17:22 Expedito Marcondes
Imprimir

SaberExcel - o site de quem precisa aprender macros Microsoft Excel VBA

Estas macros do aplicativo Microsoft Excel VBA(Visual Basic Application), usando as wkf (WorksheetFunctions), retorna a soma de determinada coluna. As worksheetsFunctions(Funções de Planilhas) são poderosas e desempenham com grande performance suas funções. Fizemos uma planilha para cada Função de Planilha do Excel, as WorksheetFunctions.
Comprar . -
340 Planilhas Exemplos WorksheetFunctions(VBA) -  Funções de Planilha
--Aprendendo a usar as Worksheetfunctions - Escola de Informática SaberExcel VBA Estudos®.

Sub Somar_sbx()
vSomar = Application.WorksheetFunction.Sum(Range("L" & X & ":L" & Y))
'[G1].Value = vSomar
Saber2.Cells(6, 4).Value = vSomar
Saber1.Cells(6, 4).Value = vSomar

Saber1.Shapes("sbx1").Visible = True
Saber1.Shapes("sbx2").Visible = False
End Sub


Sub Somar_sbx_limitando_area()
vSomar = Application.WorksheetFunction.Sum(Range("L2" & X & ":L7" & Y))
'[G1].Value = vSomar
Saber2.Cells(6, 4).Value = vSomar     '
Saber1.Cells(6, 4).Value = vSomar

Saber1.Shapes("sbx1").Visible = False
Saber1.Shapes("sbx2").Visible = True
End Sub

Sub limpar_teste()
Saber2.Cells(6, 4).Value = vSomar
Saber1.Cells(6, 4).Value = vSomar

Saber1.Shapes("sbx1").Visible = False
Saber1.Shapes("sbx2").Visible = False
End Sub




Tags: