Summing a Column of Variable Length

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello, me again,

Question: I would like to sum the values contained in Column D, on sheet
"Master", and place total in Column Z, on sheet "Monthly". Hitch: the
number in column D on sheet 'Master' is variable.

How can i accomplish this?
 
=sum(Master!D:D)

if you mean with a macro

tot = Application.Sum(Worksheets("Master").columns(4))

worksheets("Monthly").Cells(rows.count,"Z").End(xlup)(2) = Tot
 
Hi there,

This works well....how can i copy this function down to specified cells in
Column Z?
 
Sub Sum1()
Dim iEnd As Integer
iEnd = Sheets("Master").Range("D1").End(xlDown).Row
Sheets("Monthly").Range("Z1").Formula = "=SUM(Master!D1:D" & iEnd &
")"
End Sub

Hth,
Merjet
 
Back
Top