Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
When I add from another Excel (2003) file into one of mine, I unfortunately
also inherit all of their styles. I have a file currently with about 50 styles from other people of which about ten of those are different "Normal" styles alone. I know how to delete them one-by-one via Format, Style, Delete (what a tedious process, MS!) till only those remain that I prefer. Is here a way that I can select at once all those I don't want and delete in a single stroke? If not, can someone explain why MS did not allow for this? |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
hi, !
When I add from another Excel (2003) file into one of mine, I unfortunately also inherit all of their styles. I have a file currently with about 50 styles from other people of which about ten of those are different "Normal" styles alone. I know how to delete them one-by-one via Format, Style, Delete (what a tedious process, MS!) till only those remain that I prefer. Is here a way that I can select at once all those I don't want and delete in a single stroke? If not, can someone explain why MS did not allow for this? the following macros does this: first: puts all the styles names starting on active cell downward so you can revise/check/remove/separate/... those you want to remain and let all-togheter those you want to be deleted/erased/removed/... select the result contiguous range and run ... the second: deletes the names in the selected contiguous range (one column) hth, hector. Sub GetStylesNames() Dim n As Integer With ActiveWorkbook.Styles For n = 1 To .Count ActiveCell.Offset(n - 1) = .Item(n).Name Next End With End Sub Sub DeleteSelectedStyles() Dim n As Byte, Styles2Erase As String For n = 1 To Selection.Count Styles2Erase = Styles2Erase & Selection.Cells(n) & """,""" Next ExecuteExcel4Macro "if(delete.style({""" & Styles2Erase & """}))" End Sub |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I have tried several macros to delete styles however I'm still left with a
large number of styles that appear to be 'untoucheable' - similar to hidden reference names, only I have not found a method to 'unhide' these style names. Are you aware of any method that can clear styles that cannot be modified or deleted? Thanks, Rick "Héctor Miguel" wrote: hi, ! When I add from another Excel (2003) file into one of mine, I unfortunately also inherit all of their styles. I have a file currently with about 50 styles from other people of which about ten of those are different "Normal" styles alone. I know how to delete them one-by-one via Format, Style, Delete (what a tedious process, MS!) till only those remain that I prefer. Is here a way that I can select at once all those I don't want and delete in a single stroke? If not, can someone explain why MS did not allow for this? the following macros does this: first: puts all the styles names starting on active cell downward so you can revise/check/remove/separate/... those you want to remain and let all-togheter those you want to be deleted/erased/removed/... select the result contiguous range and run ... the second: deletes the names in the selected contiguous range (one column) hth, hector. Sub GetStylesNames() Dim n As Integer With ActiveWorkbook.Styles For n = 1 To .Count ActiveCell.Offset(n - 1) = .Item(n).Name Next End With End Sub Sub DeleteSelectedStyles() Dim n As Byte, Styles2Erase As String For n = 1 To Selection.Count Styles2Erase = Styles2Erase & Selection.Cells(n) & """,""" Next ExecuteExcel4Macro "if(delete.style({""" & Styles2Erase & """}))" End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Creating styles | Excel Discussion (Misc queries) | |||
Excel Cell Styles - Quick Styles? | Excel Discussion (Misc queries) | |||
Outline Styles | Excel Discussion (Misc queries) | |||
Styles in Excel | Excel Discussion (Misc queries) | |||
format styles | New Users to Excel |