ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Summary Tally of Multiple Sheets (https://www.excelbanter.com/excel-worksheet-functions/21900-summary-tally-multiple-sheets.html)

Denise

Summary Tally of Multiple Sheets
 
Want to tally, on a unique summary sheet, all particpants in a class offered
at my workplace.

Sheet 1 is Patients

A=Last name
B=First name
C=Address, etc. until I=Marketing Tool

Sheet 2 is Non-Patients - same columar format

I want Sheet 3 to tally everyone to make one attendance list

Can it sort them by last name at the same time?

I searched the database but haven't bumped into what I need yet.

Thanks!!

Denise

Denise

Found the following macro in the knowledgebase: I'm the biggest rookie when
it comes to these but I set it up in a module of my spreadsheet.

When I try to run it I get a compile error related to LastRow. Does this
function have to be expanded on for this to run properly?

I'm trying to summarize all rows on two sheets named Patients and
Non-Patients to create a master attendance list. This creates the summary on
a sheet called Master. Any macro Phd's out there that can give me a lesson?

Thanks!!

Sub Test5()
Dim sh As Worksheet
Dim DestSh As Worksheet
Dim shLast As Long
Dim Last As Long

On Error Resume Next
If Len(ThisWorkbook.Worksheets.Item("Master").Name) = 0 Then
On Error GoTo 0
Application.ScreenUpdating = False
Set DestSh = ThisWorkbook.Worksheets.Add
DestSh.Name = "Master"
For Each sh In ThisWorkbook.Worksheets
If sh.Name < DestSh.Name Then
Last = LastRow(DestSh)
shLast = LastRow(sh)

sh.Range(sh.Rows(4), sh.Rows(shLast)).Copy DestSh.Cells(Last
+ 1, "A")

End If
Next
DestSh.Cells(1).Select
Application.ScreenUpdating = True
Else
MsgBox "The sheet Master already exist"
End If
End Sub

"Denise" wrote:

Want to tally, on a unique summary sheet, all particpants in a class offered
at my workplace.

Sheet 1 is Patients

A=Last name
B=First name
C=Address, etc. until I=Marketing Tool

Sheet 2 is Non-Patients - same columar format

I want Sheet 3 to tally everyone to make one attendance list

Can it sort them by last name at the same time?

I searched the database but haven't bumped into what I need yet.

Thanks!!

Denise



All times are GMT +1. The time now is 08:44 PM.

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