VBA to change color when cell updated

Nagaraj udupa

New Member
Joined
Jul 21, 2018
Messages
2
I am tring to change color of a cell in a cell range("A10:F100") when ever a cell in a range is updated from previous value by formula due to change in other worksheet in earlier version of office(before 2007). Please help in this regard
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Hi

Please try with this

Code:
Private Sub Worksheet_Change(ByVal Target As Range)

If Not Intersect(Target, Range("A10:F100")) Is Nothing Then

ActiveCell.Interior.Color = 49407

End If

End Sub
 
Upvote 0
Hi

Please try with this

Code:
Private Sub Worksheet_Change(ByVal Target As Range)

If Not Intersect(Target, Range("A10:F100")) Is Nothing Then

ActiveCell.Interior.Color = 49407
[CODE]
End If

End Sub

[/CODE]
Worksheet_Change event code is not triggered if the cells changing values are the result of a formula, which by my understanding, is the case here.

Even if the cells were changed manually, your code will most likely not colour the changed cell. For example, if a value was entered in B14 and Enter pressed, with normal settings the active cell would then be B15 & that is the cell your code colours, not the changed cell B14
 
Upvote 0
Agreed with you Peter, could you please share right coding, i am waiting to learn
I don't have any at the moment or I would have already posted it. :)


I am tring to change color of a cell in a cell range("A10:F100") when ever a cell in a range is updated from previous value by formula due to change in other worksheet ..
I'm not sure I will have a suitable answer anyway, but can you post the formulas from cells A10:F10?
 
Upvote 0
HI,
The code given by Learn Excel in Tamil is not working
In post 3 I already indicated that would be the case. ;)

Also, in post 5, I asked you for more information - that you have not provided.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,896
Messages
6,175,264
Members
452,627
Latest member
KitkatToby

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