ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   if font is bold then cell value is number (https://www.excelbanter.com/excel-discussion-misc-queries/202416-if-font-bold-then-cell-value-number.html)

Jon

if font is bold then cell value is number
 
Greeting,

Is there any code to input a value to cell if A1 is bold and Red color?


Gary''s Student

if font is bold then cell value is number
 
Sub jon()
With Range("A1").Font
If .FontStyle = "Bold" And .ColorIndex = 3 Then
Range("A1").Value = 123
End If
End With
End Sub

--
Gary''s Student - gsnu200804


All times are GMT +1. The time now is 05:35 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com