ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   merging worksheets into an overall report (https://www.excelbanter.com/excel-worksheet-functions/204541-merging-worksheets-into-overall-report.html)

neebri

merging worksheets into an overall report
 
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.

Ron de Bruin

merging worksheets into an overall report
 
Read the info on the page
http://www.rondebruin.nl/copy2.htm

Important:
The macro examples use the LastRow or LastCol function that you can find in the last section of this page.



--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"neebri" wrote in message ...
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.


RAYCV

merging worksheets into an overall report
 
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

"Ron de Bruin" wrote:

Read the info on the page
http://www.rondebruin.nl/copy2.htm

Important:
The macro examples use the LastRow or LastCol function that you can find in the last section of this page.



--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"neebri" wrote in message ...
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.



Ron de Bruin

merging worksheets into an overall report
 
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

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"RAYCV" wrote in message ...
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

"Ron de Bruin" wrote:

Read the info on the page
http://www.rondebruin.nl/copy2.htm

Important:
The macro examples use the LastRow or LastCol function that you can find in the last section of this page.



--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"neebri" wrote in message ...
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.




All times are GMT +1. The time now is 08:43 AM.

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