Placing value in every col of a named range row

J

John

What code do I use to place dashes in all cells of row 2 of ToTable? I tried
Sheets(ToSheet).Range(ToTable)(2).Value = "'- - - - -"
but this seems to put the dashes in only row 1 col 2 cell.

I appreciate your help, -John
 
G

Gary''s Student

This assumes that there is a block of cells with the Defined Name "qwerty":

Sub dural()
Set r = Range("qwerty")
Set r2 = r(1).Offset(1, 0).EntireRow
Set r3 = Intersect(r, r2)
r3.Value = "-----"
End Sub

r is the range of the table
r2 is the first cell of the second row of the table
r3 is the second row of the table
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top