Hello All,
I am trying to resolve an issue in excel and am stumped... I have a set of data spanning across 400 rows and I want to somehow be able to have a macro to randomnly select say 40 rows of data and highlight it..
Is this possible in Excel?
Hello All,
I am trying to resolve an issue in excel and am stumped... I have a set of data spanning across 400 rows and I want to somehow be able to have a macro to randomnly select say 40 rows of data and highlight it..
Is this possible in Excel?
See the attached workbook as an example.
Gary's Student
Here is my version. Run the macro and enter how many rows you want to choose.
Edit: I took the function from Ozgrid. Thanks to whoever made it.
![]()
Please Login or Register to view this content.
Last edited by RHCPgergo; 11-28-2012 at 09:54 AM. Reason: reference
Hi,
Sorry for the late response... I have tested both and they work a dream... I like the one from OzGrid as it gives me the ability to select the lines I wish to audit.
I do have one questions though... The macro highlights the number of rows I require but I would want it highlight the rows... Would anyone know how to change the macro to colour the selected rows instead of highlighting them
Hi,
change this line at the end of the sub:to this:![]()
Please Login or Register to view this content.
Change to ColorIndex to whatever you want from 1 to 56. Here's a key to which is which.![]()
Please Login or Register to view this content.
http://dmcritchie.mvps.org/excel/colors.htm#colorindex
Last edited by RHCPgergo; 11-28-2012 at 10:28 AM. Reason: oops
Absolutely brilliant... Really appreciate the input... This works a dream now
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks