From: Sudhir on 2 Jun 2010 08:46 Hi, I have an excel sheet with mutiple work sheets. Each worksheet has some data (numbers) in column G. The number of enteries in each sheet is different (Sheet 1 has 7 enteries, Sheet 2 has 27, etc). I want to create a summary sheet in the same file which would list the names of the sheets one below another (Name of sheet 1 in A1, Name of sheet 2 in A2, etc) and also sum the total from column G in each sheet against the names of the sheet in the next column. Please help. Thanks
From: steve on 3 Jun 2010 06:40 Hi, Using 2007 this macro should work, the "summary sheet" should be the last sheet in your workbook, and you will have to alter the value "x" to match the number of sheets you want to summarise. Sub summary() For x = 1 To 3 Sheets("summary").Range("A" & x) = Sheets(x).Name Sheets("summary").Range("b" & x) = WorksheetFunction.Sum(Sheets(x).Range("a:a")) Next End Sub Regards Steve "Sudhir" <Sudhir(a)discussions.microsoft.com> wrote in message news:176C8AB4-476C-4FE9-8703-734F88D8AD95(a)microsoft.com... > Hi, > I have an excel sheet with mutiple work sheets. Each worksheet has some > data > (numbers) in column G. The number of enteries in each sheet is different > (Sheet 1 has 7 enteries, Sheet 2 has 27, etc). > > I want to create a summary sheet in the same file which would list the > names > of the sheets one below another (Name of sheet 1 in A1, Name of sheet 2 in > A2, etc) and also sum the total from column G in each sheet against the > names > of the sheet in the next column. > > Please help. > > Thanks
|
Pages: 1 Prev: Highlight exact match in column and count Next: Userform Import problem |