there are these filters on the side of a worksheet i am trying to reproduce and i need to know how to add them in vba!
http://tinypic.com/r/9ux9op/5
there are these filters on the side of a worksheet i am trying to reproduce and i need to know how to add them in vba!
http://tinypic.com/r/9ux9op/5
------------------------------------------------
Happy Coding my friends
It is data grouping, and done like so
[vba]
Rows("2:5").Rows.Group
[/vba]
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber
so if i wanted to make X groups based on empty cells in column A, if i do a loop and say group each one will it show up on the side in one set of groupings? or would each group get its own column on the side?
------------------------------------------------
Happy Coding my friends
tried this
[VBA]Dim cell as Range
Dim x1 as integer, x2 as integer, i as integer
x1 = 2
For i=1 to 12
For each cell in range("A" & x1 & ":A22")
if cell.value = "" then
x2 = cell.row
Rows(x1 & ":" & x2).Rows.Group
x1 = x2 + 1
Exit For
End if
Next i
Next cell[/VBA]
------------------------------------------------
Happy Coding my friends
Have a look in Excel help regarding Grouping, then macro record the process.
Remember To Do the Following....
Use [Code].... [/Code] tags when posting code to the thread.
Mark your thread as Solved if satisfied by using the Thread Tools options.
If posting the same issue to another forum please show the link
thank you very much, how many times do i have to turn to the macro recorder before i remember how awesome it is? no sense trying to record a function whose name you dont even know though so thanks again to both of you!
cheers
------------------------------------------------
Happy Coding my friends