rangudu_2008
07-29-2010, 08:09 AM
Hi,
I've coded a macro where i can pick out specific number of sample rows based on the user input. I've coded this using the rand() function, so it picks and gives me the specific number of rows required in a new sheet.
I want to add a little bit more functionality into this code (for which i need some help) and make it pick specific number of rows calculated at runtime (not input by the user). i.e. I want the code to automatically choose rows randomly based on a specific rate (%) (say 5% or 10%)
I've attached two files.. The dump file contains the data that needs to be sampled and the other file is the macro code.
I've also one other thing to be taken care of. The dump sheet which contains the the source data has a specific column called LAST_UPDATED_NAME. I actually need to sample out specific number of rows for each name, based on the percentage. My code actually gives out a random set of rows in a separate sheet (which needs to be tweaked a bit) which needs to be chosen randomly at a different rate for each person and should be collated into one single sheet finally when the macro stops execution.
Can someone help me to code in such a functionality?? :help
FYI.. I coded this macro in Excel 2003, but now i'm using Excel 2007.
Ranga
I've coded a macro where i can pick out specific number of sample rows based on the user input. I've coded this using the rand() function, so it picks and gives me the specific number of rows required in a new sheet.
I want to add a little bit more functionality into this code (for which i need some help) and make it pick specific number of rows calculated at runtime (not input by the user). i.e. I want the code to automatically choose rows randomly based on a specific rate (%) (say 5% or 10%)
I've attached two files.. The dump file contains the data that needs to be sampled and the other file is the macro code.
I've also one other thing to be taken care of. The dump sheet which contains the the source data has a specific column called LAST_UPDATED_NAME. I actually need to sample out specific number of rows for each name, based on the percentage. My code actually gives out a random set of rows in a separate sheet (which needs to be tweaked a bit) which needs to be chosen randomly at a different rate for each person and should be collated into one single sheet finally when the macro stops execution.
Can someone help me to code in such a functionality?? :help
FYI.. I coded this macro in Excel 2003, but now i'm using Excel 2007.
Ranga