Saturday, September 27, 2014

Excel tip (blank rows)

I needed to add several blank rows to my excel spread sheet..
found these cool tips!
1) add a new colunm A
2) number your existing rows (excel is smart enough to fill with odd numbers 1, 3, 5)
3) number the corresponding rows 2, 4, 6
4) sort the column smallest to largest
5) you could modify this to insert a row above or a row below
6) delete your sorting colunm

This method works well to randomize data in a spreadsheet.
1) use the formula =RANDBETWEEN(1,100) or however many numbers you want
2) drag the formula down the column
3) sort that column and presto! random information for students to sort

OR write a macro!  I have NOT tested this method!!

 Sub insertrow()
' insertrow Macro

Application.ScreenUpdating = True
Dim count As Integer
Dim X As Integer

For count = 1 To 20
If activecell.Value <> "" Then
activecell.Offset(1, 0).Select
Range(activecell, activecell.Offset(0, 0)).EntireRow.Insert
activecell.Offset(1, 0).Select
For X = 1 To 1
Next X
Else
activecell.Offset(1, 0).Range("a1").Select
End If
Next count

End Sub

By: Neville

No comments:

Post a Comment