There r 2 workbooks 'ACP.xlsm' and 'Reference.xlsm'. The code must compare a value (fm 3rd row) in col A of ACP.xlsm workbook to a value (rows frm A2 of) in column A of Reference.xlsm work book or column B, C in tat order. If a match is found thn it should offset one step from col A in ACP.xlsm to col B in ACP.xlsm and check for a value "WS Grouup Totals:" in that col & when it finds the 1st instance of the value, it should stop checking and copy the range of rows from the row when Col A in ACP.xlsm matched with a value in Col (A or B or C ) in Reference .xlsm and paste it in separate worksheet in ACP.xlsm. I have written a code for the purpose but when I run this code it keeps on throwing me the error that subscript is out of range (Error9).can you please help me run this code or suggest a better code...I am a beginner and I am at my wits end.thank you.I have attached my data files for your reference in case my description is not clear...my full code can be found in ACP.xlsm file attached...can't post it here cos of the line limit...please help thanks..
Last edited by shrimic; 02-09-2012 at 09:10 PM.
Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here
Richard Buttrey
If this was useful then please rate it appropriately.
Click the small star iconat the bottom left of my post.
Thanks Richard, Sorry this is my first time in the forum and I was not aware of the rules...I have made the change as advised by you...
Hi
First thing I found is that your code is looking for sheets in acp.xlsm that don't exist. In the example file you have sheet1, sheet2 and sheet3, but your code goes looking for Sheet4, Sheet5, Sheet6....
rylo
Last edited by rylo; 02-09-2012 at 07:43 PM.
Thanks rylo,
Please find my full code in the ACP.xlsm file attached..couldn't post here cos of the line limit
Hi
You now have 2 copies of ACP.xlsm in post #1 and they both have code that refers to sheets that don't exist in that file.
rylo
ok now I get it..I need to first add those sheets before I can copy to them..thanks..
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks