Hi Vandana, You can use following code:-
Sub vandana() Application.ScreenUpdating = False Application.DisplayAlerts = False On Error GoTo MyError i = Worksheets.Count Sheets("Sheet1").Select For i = 1 To i - 0 Range("b2").Select k = Range("b2").Value + k ActiveSheet.Previous.Select Next Exit Sub MyError: 'MsgBox Err.Number & " " & Err.Description MsgBox ("Total of B2 from all the sheets is " & k) End Sub Note: I have also attached the file containing the same macro. Thanks. -- DILIP KUMAR PANDEY MBA-HR,B COM(Hons.),BCA Mobile: +91 9810929744 dilipan...@gmail.com dilipan...@yahoo.com New Delhi - 110062 On Tue, May 19, 2009 at 11:02 PM, Vandana Vallam <vandanaval...@gmail.com>wrote: > Dear Friends, Can someone help me to run a macro to calculate the sum of a > cell across sheets...for Example > > Sheet 1 B2, Sheet 2 B2 and Sheet 3 B3 have some numbers...now i want to run > a macro that will take the sum of cell B2 across the sheets, in Summary > sheet B2. > > Thanks & Regards, > Vandana > > > > --~--~---------~--~----~------------~-------~--~----~ ------------------------------------------------------------------------------------- Some important links for excel users: 1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at http://www.excelitems.com 2. Excel tutorials at http://www.excel-macros.blogspot.com 3. Learn VBA Macros at http://www.vbamacros.blogspot.com 4. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com If you find any spam message in the group, please send an email to: Ayush Jain @ jainayus...@gmail.com or Ashish Jain @ 26may.1...@gmail.com ------------------------------------------------------------------------------------- -~----------~----~----~----~------~----~------~--~---
Add value of B2 from all sheets.xls
Description: MS-Excel spreadsheet