I am learning VBA and need a little help with a macro that I am writing.
I have a worksheet with data that I split into multiple worksheets based on criteria in one column. E.g. Column A has unique usernames, I have a macro (found it online and tweaked) that splits the spreadsheet (Sheet1) into different tabs named by the criteria (lgold, gsmth, ppatty, etc.). So, as a starting point I have an excel file with 20-30 tabs. all named differently, with data. What I need done firther is:
1. delete tabs with fewer than 31 rows
2. select 5 rows from each remaining tab and copy them to a new tab, named “To Audit”. The 5 rows from each tab should not be the first 5, but either
a. random 5 rows, or
b. every Nth row….e.g. if “lgold” tab has 346 rows =346/5=69.2=select every 69th row and copy it to a new tab....whichever is easier
I need a push in the right direction as far as sequence and which functions to use. I am at the first few chapters of the “idiot’s guide to VBA” level right now….the above macro is a little too advanced for me to write yet.
Thank you all for help!
Lena