Macro to select 1st cell of 3rd row

J

Janet A. Thompson

I want to format a table but begin on the 3rd row which has 2 columns. How to
select the table's 3rd row - to end of table (variable rows in all tables).
Save and close the file.
How to write?
 
P

Pesach Shelnitz

Hi Janet,

The following macro adds bold formatting to all the rows from row 3 to the
end of the table where the cursor is located.

Sub FormatRow3ToEnd()
Dim i As Integer

With Selection.Tables(1)
For i = 3 To .Rows.Count
With .Rows(i).Range
.Bold = True
End With
Next
End With
End Sub

Change the line that begins with .Bold to achieve the formatting that you
want.
 

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