Group Rows With Same Format Excel VBA Macro

preview_player
Показать описание


And yet, if you want more, you can find various Excel applications of different nature in the other blogs of the Excel Macro Mania saga:
Рекомендации по теме
Комментарии
Автор

Awesome! This is exactly what I was looking for! Thank you so much!

tomjohn
Автор

perfect grouping i was struggle whole week to do grouping with vba and i cant even find one good tutorial that i will do the group but i see yours and try to did with string its work. Great work please post more videos in detail. I have one question why u did not include last row and write new code for the last row

amnashahbaz
Автор

Thanks for the tutorial, i would lije to group my rows depending on the, if its same data on a specific coulmn group them, if data changes start new group
Will really appreciate if you could help

muhammadahmed
Автор

This is amazing! Is there a way to do this with columns and trigger group and ungroup with a button on the sheet?

healthsis
Автор

This is excellent. How to create nested grouping? I am trying to recreate P6 schedule in excel with option to expand and collapse the schedule.

mechashews
Автор

Nice one, been looking for such a tutorial a lot.
is there a way to that to the inner groups too ? to create subgroups for 1.1 and for 1.1.1 and so on ? not just the big group ?

NEM
Автор

excelent job, i need little help. i want the same code to run from another sheet how can i do that?

SyedAbdulAziz-dswc
Автор

hi, i have grouped and created outline after the sheet has been outlined i want to copy only the data that is visible and not all the data that comes with it. how can i go about this?

aniruddhhs
Автор

Great video! Im trying to recreate this with cells that are NOT UNDERLINED in literally the same situation as you and im running into an error and the debugging points me to the last statement after "Next r"

Runtime error '1004'
Method 'Range' of object '_Global' failed

Here is my code:
Sub GroupCellsSameFormat()

Dim r As Integer, lr As Integer, startr As Integer, endr As Integer

lr = Cells(Rows.Count, "B").End(xlUp).Row

For r = 5 To lr
If Range("B" & r).Font.Underline = False Then
If startr = 0 Then
startr = r + 1
Else
endr = r - 1
Range("B" & startr & ":B" & endr).Rows.Group
startr = r + 1

End If
End If
Next r
Range("B" & startr & ":B" & lr).Rows.Group

End Sub

Please let me know what i should do :)

jacobazoulay