View Single Post
 
Old 09-05-2024, 06:28 AM
Marcia's Avatar
Marcia Marcia is offline Windows 11 Office 2021
Expert
 
Join Date: May 2018
Location: Philippines
Posts: 553
Marcia has a spectacular aura aboutMarcia has a spectacular aura aboutMarcia has a spectacular aura about
Default VBA to change the font if condition is met

Hi. I would like help in making a formula into a vba code.

In D5 until AH105 of "DTR Monitor" sheet, I would like to populate it with the following formula through a vba code.
Code:
Sub DTR_Monitor()

Dim WS As Worksheet

Set WS = Worksheets("DTR Monitor")

WS.Range("D5").Formula =_
IF(INDEX(Time,MATCH([@[Name of Employee]],Name,0),MATCH(D$4,DateMonitor,0)) is a number, enter "P" then change the font from Calibri to Wingdings2 (A check mark is the result).
Else, INDEX(Time,MATCH([@[Name ofEmployee]],Name,0),MATCH(D$4,DateMonitor,0)), retain the calibri font

End Sub
Thank you for the usual help.
Reply With Quote