setting Bold

  • Thread starter FJ Shepley & JM Pfohl
  • Start date
F

FJ Shepley & JM Pfohl

In the macro below I have tried to make the following line bold along with
the colour but I kept getiing errors. What is the proper way of doing it?

ship.EntireRow.Font.ColorIndex = 1

I would also like to make the macro work automatically whenever the
worksheet is opened.

Thanks
Frank.





Sub macro1()
Dim ship As Range
For Each ship In Worksheets("shipped").Range("ak3",
Range("ak3").End(xlDown))
If ship = "1" Then 'yesterday
ship.EntireRow.Font.ColorIndex = 3
ElseIf ship = "0" Then 'today
ship.EntireRow.Font.ColorIndex = 1
Else: ship.EntireRow.Font.ColorIndex = 10 'tomorrow
End If
Next ship
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