ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   summing up daily data in a monthly compilation (https://www.excelbanter.com/excel-worksheet-functions/31794-summing-up-daily-data-monthly-compilation.html)

mark_vi_

summing up daily data in a monthly compilation
 

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


--
mark_vi_
------------------------------------------------------------------------
mark_vi_'s Profile: http://www.excelforum.com/member.php...o&userid=24507
View this thread: http://www.excelforum.com/showthread...hreadid=381020


anilsolipuram


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)


--
anilsolipuram
------------------------------------------------------------------------
anilsolipuram's Profile: http://www.excelforum.com/member.php...o&userid=16271
View this thread: http://www.excelforum.com/showthread...hreadid=381020


Dave Peterson

See one more reply at your post in .excel.

mark_vi_ wrote:

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

--
mark_vi_
------------------------------------------------------------------------
mark_vi_'s Profile: http://www.excelforum.com/member.php...o&userid=24507
View this thread: http://www.excelforum.com/showthread...hreadid=381020


--

Dave Peterson


All times are GMT +1. The time now is 12:45 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com