Adding Column A for All sheets : Please HELP

  • Thread starter Thread starter jhong
  • Start date Start date
J

jhong

Hi There,


I need your help, I want to do a macro that will add all values from
column A of all sheets within a workbook. Please please help me.


Thanks in Advance!

Jong
 
Please explain some more. When you say add do you mean "Sum" or "Copy", do
you mean the entire column of each row in Column on each sheet?
 
Please explain some more.  When you say add do you mean "Sum" or "Copy",do
you mean the entire column of each row in Column on each sheet?

--

Regards,
Nigel
(e-mail address removed)


Hi Nigel,

Thanks for the reply, i mean summing up data from A column from
different sheets within a workbook. I hate adding this values thru
link hope you can help me. Thanks in advance again!
 
Try something like.....(sums all values in column A of all sheets)

Sub aTotals()
Dim wS As Worksheet
Dim cTotal As Double, sRange As Range

For Each wS In Worksheets
With wS
Set sRange = .Range("A1:A" & .Cells(.Rows.Count, "A").End(xlUp).Row)
cTotal = cTotal + Application.WorksheetFunction.Sum(sRange)
End With
Next wS
MsgBox cTotal
End Sub


--

Regards,
Nigel
(e-mail address removed)



Please explain some more. When you say add do you mean "Sum" or "Copy", do
you mean the entire column of each row in Column on each sheet?

--

Regards,
Nigel
(e-mail address removed)


Hi Nigel,

Thanks for the reply, i mean summing up data from A column from
different sheets within a workbook. I hate adding this values thru
link hope you can help me. Thanks in advance again!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top