I have a spreadsheet with 2000+ rows and multiple columns.
I need to make a line chart using only the time and temperature columns.
However, I'd like to use only every 30th row, as like a "random" sampling of the data. Instead of manually going through 2000+ rows to select every 30th row, how can I do it all at once? Or at least, faster than doing it manually?
-
-
not sure if this is what you are going for, but one way for a truly random sample might be create a new column (call it record number) and using the random function assign a number to that column.
Now, copy the column, and paste special "values" back (to ensure it does not change again. Now sort on the record column number and just chart the first 30 rows -
I think you'll have to use a visual Basic macro.
That is possibly the best way.
I can't really help you with the details of Visual Basic though - while I may understand bits, its only beginner level easy stuff. -
The only way I can think of doing it with VB would be a macro that would hide 29 rows, skip one, then hide 29....etc....but I don't know if that really qualifies as "random"
-
-
-
agreed, but a simple macro ought to do it.
Start on row 2, start macro recording, select 29 rows, choose HIDE, cursor down 2 rows, stop recording.
Now just hold down your macro key combo until it runs through the entire spreadsheet.
You could write a vba script with a FOR LOOP to do it all at once, but since you are only doing it once, no point in over complicating things
Excel 2003 Question
Discussion in 'Windows OS and Software' started by Matt is Pro, Mar 16, 2009.