5

In Excel, the built-in cell styles are grouped. There is "Good, Bad and Neutral", "Data and Model", "Themed Cell Styles", etc:

enter image description here

Is there a way to interact with these groups? Like, can I delete an entire group? Can I create a group and add my own styles to it? Can I add styles to a preexisting group? Preferably via VBA.

I've looped through the styles in VBA (For Each st in Activeworkbook.Styles) and inspected their properties, but couldn't find any difference between the styles belonging to one group or to another group. The Parent property seems always empty - or whatever <No Variables> means.

Many thanks

ElRudi
  • 464

1 Answers1

0

Unfortunately, you can't, although it would be a good addition (may be not the answer you wanted to get...)

There are predefined Cell style groups, and user defined Cell styles go to a group named Custom. There is no way of renaming the groups, or of selecting which group does a style belong to. The most you can do is deleting a predefined style, with Right click on a style -> Delete.

Source:

https://social.technet.microsoft.com/Forums/en-US/5c486888-c86b-4953-84a7-7b635765dbf8/cell-style-grouping?forum=excel

and same questions by the same person:

https://answers.microsoft.com/en-us/msoffice/forum/all/cell-style-grouping/0c071adb-552c-449f-a396-4b5408ae239b

https://www.mrexcel.com/board/threads/cell-style-groupings.845676/