ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   macro that will change the font of a cell if i change a value (https://www.excelbanter.com/excel-discussion-misc-queries/196492-macro-will-change-font-cell-if-i-change-value.html)

jk

macro that will change the font of a cell if i change a value
 
Does someone know how to create a macro that waits for changes in any cell
and when this occurs change the font of that cell?

Wigi

macro that will change the font of a cell if i change a value
 
That's possible.

For instance, copy-paste this code in the private module of the sheet where
you want to apply it:


Private Sub Worksheet_Change(ByVal Target As Range)

Target.Cells.Font.Name = "..."

End Sub


Fill in the desired font name and you can of course use other properties of
the target range as well. (bold, font size, alignment, and many others).

--
Wigi:
http://www.wimgielis.be = Excel/VBA, soccer and music


"jk" wrote:

Does someone know how to create a macro that waits for changes in any cell
and when this occurs change the font of that cell?


Gord Dibben

macro that will change the font of a cell if i change a value
 
Do you need it to be a macro?

Conditional Formatting would work as well.


Gord Dibben MS Excel MVP

On Sun, 27 Jul 2008 14:38:35 -0700, jk wrote:

Does someone know how to create a macro that waits for changes in any cell
and when this occurs change the font of that cell?




All times are GMT +1. The time now is 07:16 AM.

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