Bold Last Row

R

ryguy7272

I am trying a few methods to select the last row in each sheet (using a for
next loop) and bold the entire row, but nothing seems to be working. My code
is below:

Dim lastrow as Long
lastrow = .Cells(.Rows.Count, "A").End(xlUp).Row
With Range("A" & lastrow)
..Font.Bold = True
End With

I tried this too:
Rows(X).EntireRow.Font.Bold = True

Nothing has worked yet! Please help!!


Thanks,
Ryan---
 
J

Jim Thomlinson

Sub BoldLastRow()
Dim wks As Worksheet

For Each wks In Worksheets
wks.Cells(Rows.Count, "A").End(xlUp).EntireRow.Font.Bold = True
Next wks
End Sub
 
R

ryguy7272

Awesome!!! Thank you so much Jim!!!


--
RyGuy


Jim Thomlinson said:
Sub BoldLastRow()
Dim wks As Worksheet

For Each wks In Worksheets
wks.Cells(Rows.Count, "A").End(xlUp).EntireRow.Font.Bold = True
Next wks
End Sub
 

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