By: Rubayed Razib Suprov

In reply to AMGHAR.

Hello Amghar,
Thanks a lot for submitting Excel related problem at Exceldemy. Here you can use the VBA code mentioned below.

Sub Detect_font_color()
If Worksheets("Sheet1").Range("D6").Font.ColorIndex = 6 Then
Range("D6").RowHeight = 20
End If
End Sub

In that code, you need to mention the cell address inside the VBA code range property(as shown in the image). After this, if the condition satisfied, the cell row height will adjust accordingly.