Hi,
I have this macro to cycle through all worksheets, retrieve data and paste into the "Test Lookup" sheet, but I want to skip one worksheet (called "Specs").
Any thoughts on how? Thanks.
![]()
Please Login or Register to view this content.
Hi,
I have this macro to cycle through all worksheets, retrieve data and paste into the "Test Lookup" sheet, but I want to skip one worksheet (called "Specs").
Any thoughts on how? Thanks.
![]()
Please Login or Register to view this content.
Last edited by Leith Ross; 02-02-2015 at 03:04 AM. Reason: Added Code Tags
![]()
Please Login or Register to view this content.
Ben Van Johnson
Try this...
![]()
Please Login or Register to view this content.
If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
Mark your thread as Solved
If the suggestion helps you, then Click *below to Add Reputation
I just realised it's still going back to the "Spec" sheet at the end and copying and trying to paste data (but erroring as there's no data in those cells).
Any ideas? Thanks.
Last edited by tudley; 02-02-2015 at 09:15 PM.
Hi tudley,
Here's how you could do it with your existing code:
HTH![]()
Please Login or Register to view this content.
Robert
____________________________________________
Please ensure you mark your thread as Solved once it is. Click here to see how
If this post helps, please don't forget to say thanks by clicking the star icon in the bottom left-hand corner of my post
I given code based on your above statements.![]()
Please Login or Register to view this content.
If your sheet name is spec not specS then correct it in the provided code.
Thanks, I still get a runtime error as it's copying all the blank data in the "Specs" worksheet.
Sorry, my typo, the worksheet name is "Specs".
Also realised it was looking up data in blank sheets at the end. Deleting them and all good, except it runtime errors at "ws.select" when it gets to the end...
Last edited by tudley; 02-03-2015 at 12:02 AM.
I believe there is some availability of hidden worksheet(s)
Try this revised code
![]()
Please Login or Register to view this content.
I don't know what you mean as it should do nothing with that tab - it didn't for me when I created a workbook and called one of the tabs "Specs"Thanks, I still get a runtime error as it's copying all the blank data in the "Specs" worksheet.
Are you sure there's no trailing spaces in the tab name?
@ Sixthsense - that worked - thankyou!
@ Trebor76 - I thought that was strange too - just renamed the sheet again and it now skips it - working as well, so I have two options, thanks!
Thanks all for you help.
There must have a space (or spaces) either at the start and/or end of the tab name.@ Trebor76 - I thought that was strange too - just renamed the sheet again and it now skips it - working as well, so I have two options, thanks!
If you could mark the thread as solved it would be appreciated.
Regards,
Robert
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks