Changing font style and size

Livin404

Active Member
Joined
Jan 7, 2019
Messages
392
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Greetings, I generally know how to adjust the font size through VBA. However, when I'm trying it now it is changing the whole worksheet. I only want it to affect only the one cell. This cell can moved up or down depending how many entries are in Column A. The following VBA inserts my text perfectly, but i would like in in Times New Roman with font size 12 and in bold. No border.

Thank you

Power Query:
Sub find_last_plus_3()
Lastrow = ActiveSheet.Cells(Rows.Count, "A").End(xlUp).row
Range("A" & Lastrow + 3).Value = "REVIEWED BY:" & " " & Application.UserName
           
        
End Sub
 

Some videos you may like

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December

sericom

Well-known Member
Joined
Jan 19, 2006
Messages
915
VBA Code:
Sub find_last_plus_3()
    Lastrow = ActiveSheet.Cells(Rows.Count, "A").End(xlUp).Row
    With Range("A" & Lastrow + 3)
        .Value = "REVIEWED BY:" & " " & Application.UserName
        .Font.Size = 12
        .Font.Name = "Times New Roman"
        .Font.Bold = True
    End With
End Sub
 
Solution

Livin404

Active Member
Joined
Jan 7, 2019
Messages
392
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Thank you, I thought I typed that, but obviously I did something wrong. Exactly what I needed.
 

Watch MrExcel Video

Forum statistics

Threads
1,128,088
Messages
5,628,603
Members
416,327
Latest member
Chimay

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top