Hello,
I would like to change the font size of cell C4 to 22, if the content of cell C4 is numeric and 16 if the content is a text. I have written a macro to do this; however, I would like to make it automatically change any time the content of cell C4 changes. Currently, I have a button to click to run the macro. The VBA checks cell C4 and changes the font size accordingly. How can I program the macro to recognize when cell C4 changes and apply these conditions automatically? Is there a way to do it without VBA? I do not think that conditional formatting will work.
Sub Button3_Click()
If IsNumeric(Worksheets("Sheet1").Cells(4, 3)) Or Worksheets("Sheet1").Cells(4, 3) = "" Then
Worksheets("Sheet1").Range("C4").Font.Size = 22
Else
Worksheets("Sheet1").Range("C4").Font.Size = 16
End If
End Sub
Thank you for your help!
redsab
Bookmarks