automatic formatting

meld

New Member
Joined
Jun 29, 2010
Messages
48
I have a sheet of formulas. If someone types over a formula I want the font to turn red. So this is either a conditional format based on the first character in the formula being = (or some other indicator of whether it is a formula or not) or preferably a macro based on when a cell calue is changed.

I have tried using

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range) with code to turn the cell red

But this turns the cell below red because the active cell is already in the cell below. It almost works if the code turns the cell above red but not if a filter is on because the active cell moves down to the next filtered cell and you end up turning a hidden cell red rather than the cell you changed.

Must be a simple solution that someone can direct me to.

Thank you
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".

Forum statistics

Threads
1,215,066
Messages
6,122,948
Members
449,095
Latest member
nmaske

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top