Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Message for Ron de Bruin
Hi Ron. Thanks for the help you have given me on a few questions I
had today. I now need to copy and paste data from several sheets witin a workbook into a single master sheet. And low and behold, a Google search on that topic brought me to your tips website!! I have plagarized the following code from your site: Sub Consolidate2() Dim ws As Worksheet Dim DestSh As Worksheet Dim shLast As Long Dim Last As Long Application.ScreenUpdating = False Set DestSh = Worksheets("Consolidate") For Each ws In Worksheets If ws.Name < DestSh.Name Then Last = LastRow(DestSh) shLast = LastRow(sh) sh.Range(sh.Rows(3), sh.Rows(shLast)).Copy DestSh.Cells(Last + 1, 1) End If Next Application.ScreenUpdating = True End Sub When I run it, I get a "Sub or function not defined" error on the word LastRow. Did I screw something up? Thanks again!! -Steph |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Questioin for Ron de Bruin | Excel Discussion (Misc queries) | |||
For Ron Bruin Please | Excel Worksheet Functions | |||
For Ron de Bruin Please | Excel Worksheet Functions | |||
for Ron de Bruin | Excel Programming | |||
A Question for Ron de Bruin | Excel Programming |