Need help with this macro please...
Need to copy selected columns from one sheet and past to another another.
This code gives me a "sub not defined" error.
Appreciate any help.Please Login or Register to view this content.
Thanks
Rob
Need help with this macro please...
Need to copy selected columns from one sheet and past to another another.
This code gives me a "sub not defined" error.
Appreciate any help.Please Login or Register to view this content.
Thanks
Rob
Hi,
Are you sure it's not a "variable not defined" error? You haven't declared i but otherwise that code is fine.
Don
Please remember to mark your thread 'Solved' when appropriate.
The only bigger issue (but variable declaration - which is anyway optional) is that you try to
Of course if other sheet is active at the moment the code will fail here. But the error message will be different than you've shown.Please Login or Register to view this content.
PS. I'd rather avoid naming variables sheet1 and sheet2 - these are standard objects names and can be reused, but it's a good practice not to do so.
Best Regards,
Kaper
The error I get is "Sub or Function not defined"
There is nothing in the code you posted that should cause that as the syntax is fine and doesn’t call any other routines. Is there other code in the same workbook?
I should start fresh..
Need code to do the following:
Worksheets ("Data") contains raw data
Worksheets ("Summary") will process some of the data taken from the ("Data") sheet. That data is in several columns down to the last entry.
Need to copy those column ranges to the ("Summary") sheet.
Thanks
Rob
As for #6:
Will you please attach a SMALL sample Excel workbook(s) (10-20 rows of data is usually enough)? Please don't attach a picture of one (no-one will want to re-type all your stuff before starting).
1. Make sure that your sample data are truly REPRESENTATIVE of your real data. (If trere are typical cases like: all unique values/duplicates could occur, day/night, nobody present/several persons at once, before/on/past due, etc. - please show them all or at least indicate in text) The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.
2. Make sure that your desired solution(s) is/are also shown (mock up the results manually).
3. Make sure that all confidential/restricted information (either personal or business) like real e-mails, social security numbers, bank accounts, etc. is removed first!!
To attach an Excel file you have to do the following: Just before posting, scroll down and press Go Advanced button and then scroll down and press Manage Attachments link. Now follow the instructions at the top of that pop-up screen.
As for post #4 - which line is highlighted in yellow, when your code execution is stopped and you press Debug (see also above comments on attachment(s))
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks