ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Programmatically Name a Range (https://www.excelbanter.com/excel-programming/380931-re-programmatically-name-range.html)

Jon Peltier

Programmatically Name a Range
 
You can get most things like this with the macro recorder.

With Worksheets("My Sheet").Range("B1:B3")
.Name = "TheRangeName"
.Font.Bold = True
.HorizontalAlignment = xlHAlignRight
End With

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"Gwen" wrote in message
...
Please assist.

I want to programmatically name ranges.
for ex. b1, b2, b3
Then I want to bold and right align the named range.
Thanks





All times are GMT +1. The time now is 08:43 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com