Hi,
I'm trying to get a macro to cycle through all the sheets in a work book which have a value in cell Q2.
For each cell it should perform a simple function involving entering some code and basic copying and pasting. It should then copy and paste some cells into another (already opened) workbook, 30aug.xlsx, before returning to the original workbook and cycling through to the next sheet.
I wrote the following piece of code:
the first error I encounter is a next without for (applied to the for contained within the if code), however, even when i remove the if code and ask it to cycle through every worksheet in the workbook it just keeps looping through the same sheet over and over, never progressing to the next sheet.
My worksheets have random names as oppose to sheet1, sheet2, sheet3 etc... is this the problem.
I'm an novice, what am I doing wrong?
Thanks for all and any help
Ben
Bookmarks