Fomatting a row based on style of a cell within the same row

  • Thread starter Thread starter web2
  • Start date Start date
W

web2

Hello,

I get an Excel worksheet that has a specific style (bold/fill/pattern
etc.) applied to it in column A at various subtotals lines. I was
looking to apply this style to the ENTIRE row, e.g. cells A16, A23,
A30... have style X applied to it. I need to apply style X to entire
row 16, 23 etc. Any sample VBA code would be greatly appreciated.

Thanks,

Manish
 
The following code will set the format of the entire row for the currently
active cell, adapt to suit your needs

With ActiveCell.EntireRow
With .Font
.Name = "Arial Black"
.Size = 11
.Bold = True
End With
.Interior.Pattern = xlSolid
.Interior.Color = vbYellow
End With
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

Back
Top