Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default 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.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,123
Default 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.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 9
Default 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.


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,123
Default 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.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Merging worksheets into one Edward Owen Excel Discussion (Misc queries) 9 May 18th 06 02:45 PM
Merging worksheets pheasnt plucker Excel Discussion (Misc queries) 1 March 17th 06 10:58 AM
Merging of Worksheets David Smithz Excel Discussion (Misc queries) 1 March 6th 06 06:51 PM
Merging worksheets Ann Excel Discussion (Misc queries) 1 September 20th 05 07:22 PM
Merging info from a table to a report Gail M. Excel Discussion (Misc queries) 0 April 18th 05 05:24 PM


All times are GMT +1. The time now is 06:38 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"