Skip to content

Instantly share code, notes, and snippets.

@TGDUY
Created May 8, 2018 03:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TGDUY/22515e42c281cd631f945fe5ac6ccf0d to your computer and use it in GitHub Desktop.
Save TGDUY/22515e42c281cd631f945fe5ac6ccf0d to your computer and use it in GitHub Desktop.
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" Then' Tác động đến ô A1
If Target.Value = vbNullString Then 'Nếu ô A1 rỗng
Range("B1").Font.Bold = False 'Thì ô B1 định dạng bình thường
Else ' Nếu A1 không rỗng
Range("B1").Font.Bold = True '' Thì tô đậm ô B1
End If
End If
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment