merging worksheets into an overall report

  • Thread starter Thread starter neebri
  • Start date Start date
N

neebri

I have 5 worksheets that I put data in. I would like to once a month to be
able to merge this information and have a combined worksheets. I have read
the posts on merging and was able to follow them. But when I put in the code
for merging it comes up with an error - Compile Error- sub or function not
defined.
The code line is
' Find the last row with data on the summary
' and source worksheets.
Last = LastRow(DestSh) (Xxx this is the line i am having a
problem with)
shLast = LastRow(sh)

Is there something that I should be inserting here. I am fairly new to excel
so I don't know anything about the coding.
Thanks for any help.
 
Hi,

I am getting the same error message on exactly the same line I get Sub or
Function not defined on Last = LastRow(DestSh) with lastRow highlighted. I
have tried retyping copying etc but to no avail??

Any advice welcome.

Thanks
 
Then you not copy the function in a module in the workbook.
Download the example workbook and test it and look where the code is.

If you not see your problem send me your test workbook private and i look at it for you
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top