Create named range of cells with values in row
Many thanks, kind Sir.........your code worked perfectly for me the first
try.
Merry Christmas to you and yours,
Vaya con Dios,
Chuck, CABGx3
"JLGWhiz" wrote in message
...
This might be more than you need, but it assigns the name and then tests
to make sure that it took.
Sub dk()
Dim lc As Long, rng As Range
lc = ActiveSheet.Cells(1, Columns.Count).End(xlToLeft).Column
Set rng = ActiveSheet.Range("B1", ActiveSheet.Cells(1, lc))
rng.Name = "myRange"
Range("myRange").Interior.ColorIndex = 3
End Sub
"CLR" wrote in message
...
Hi All.......
I need help please to create a Named Range of all the cells with values
therein starting at cell B1 and continuing through all contigunious cells
with values to the right in the same row only. If there be a broken
column,
then all cells to the right of that break need not be included.
Tks,
Vaya con Dios,
Chuck, CABGx3
|