ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   changing bacground colour if formula altered (https://www.excelbanter.com/excel-programming/349096-changing-bacground-colour-if-formula-altered.html)

st120869[_6_]

changing bacground colour if formula altered
 

Hello,
I have used the scrpit below to change the background colour of any
cell contacts that have been changed. I would like to adapt it to only
change cells when the user changes a formula inside the cells.

I do not want to protect the cell contents

Private Sub Worksheet_Change(ByVal Target As Range)
Target.Interior.ColorIndex = 37
Target.Interior.Pattern = xlSolid
End Sub


--
st120869
------------------------------------------------------------------------
st120869's Profile: http://www.excelforum.com/member.php...o&userid=18330
View this thread: http://www.excelforum.com/showthread...hreadid=496630


Bob Phillips[_6_]

changing bacground colour if formula altered
 
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.HasFormula Then
Target.Interior.ColorIndex = 37
Target.Interior.Pattern = xlSolid
End If
End Sub


--

HTH

RP
(remove nothere from the email address if mailing direct)


"st120869" wrote in
message ...

Hello,
I have used the scrpit below to change the background colour of any
cell contacts that have been changed. I would like to adapt it to only
change cells when the user changes a formula inside the cells.

I do not want to protect the cell contents

Private Sub Worksheet_Change(ByVal Target As Range)
Target.Interior.ColorIndex = 37
Target.Interior.Pattern = xlSolid
End Sub


--
st120869
------------------------------------------------------------------------
st120869's Profile:

http://www.excelforum.com/member.php...o&userid=18330
View this thread: http://www.excelforum.com/showthread...hreadid=496630





All times are GMT +1. The time now is 02:49 PM.

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