summing up daily data in a monthly compilation

  • Thread starter Thread starter mark_vi_
  • Start date Start date
M

mark_vi_

I have daily data all on different worksheets (31 in total) and I would
like to add up all of the data in these worksheets in a monthly
compilation

I have so far been using the =sum('jan. 1'!B6, 'jan. 2'!B6 ... etc.)
which although is effective is very time consuming

is there an easier way to sum up all of the b6 cells without entering
them individually?

Thanks
 
You have to use userdefined function to make it simple.



Function sum_sh_range(r As Range)

Dim s As Variant
s = 0
Dim w As Worksheet
For Each w In Worksheets
w.Select
s = s + w.Range(r.Address).Value
Next

sum_sh_range = s
End Function

You have to paste the above code in vba module.

you can call the function as formula from any cell by using
=sum_sh_range(b6
 
See one more reply at your post in .excel.

mark_vi_ said:
I have daily data all on different worksheets (31 in total) and I would
like to add up all of the data in these worksheets in a monthly
compilation

I have so far been using the =sum('jan. 1'!B6, 'jan. 2'!B6 ... etc.)
which although is effective is very time consuming

is there an easier way to sum up all of the b6 cells without entering
them individually?

Thanks
 

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

Similar Threads


Back
Top