Managing multiple named ranges in Excel
Using named range is very useful to manage huge amount of data. The button “Name manager” in menu “Formulas” permits to control all the named range you created: you can edit, rename and delete them easily.
The following code example clears the content of all the 16
named range of the above spreadsheet (“CAT_1”, “CAT_2”, etc):
Sub clear_content_of_named_ranges()
For i = 1 To 16 'code to clear all the cells of the 16 named ranges of the Excel spreadsheet without modifying the cell format
Range("CAT_" & i).ClearContents
Next
End Sub
For i = 1 To 16 'code to clear all the cells of the 16 named ranges of the Excel spreadsheet without modifying the cell format
Range("CAT_" & i).ClearContents
Next
End Sub
Code syntax: charles.racaud.free.fr
No comments:
Post a Comment