Monday, 10 September 2012

Macro To Sum Of Values Of Desired Column And Display The Results In a Desired Cell

Macro To Sum Of Values Of Desired Column And Display The Results In a Desired Cell
Sub SUM1()
Dim X As Integer
Dim Y As Integer
Dim z As Integer
Dim a As String

On Error GoTo TPR:

z = InputBox("Enter Desired Col. No. To Find Sum ", "Find Sum ", "Enter Here")

a = InputBox("Enter Range Reference to Display Count Results", _
"Where to Disply Sum Results ", "Enter Here As A1 or B12.....")

For X = 2 To 100

If Cells(X, z) <> "" Then
Range(a) = Range(a) + Cells(X, z)
End If

Next X

TPR:

End Sub

No comments:

Post a Comment

Follow Me by Email

ExcelKingdom-Popular Posts

ExcelKingdom-Random Posts