Monday, September 10, 2012

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


Macro to Sum the Values of a Desired Column and Display The Results In a Desired Cell
Sub SUM_Column()
Dim X As Integer
Dim Y As Integer
Dim z As Integer
Dim a As String

On Error GoTo Label:

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
Label:
End Sub

Thanks,Tamatam

No comments:

Post a Comment

Hi User, Thank You for visiting My Blog. Please post your genuine Feedback or comments only related to this Blog Posts. Please do not post any Spam comments or Advertising kind of comments which will be Ignored.

Featured Post from this Blog

How to compare Current Snapshot Data with Previous Snapshot in Power BI

How to Dynamically compare two Snapshots Data in Power BI Scenario: Suppose, we have a sample Sales data, which is stored with Monthly Snaps...

Popular Posts from this Blog