Change the background color of cells once it being edited

S

shawn lee

Hi all, wondering if you all have any solutions for changing the
background color of cells once its being edited .

For example, I have a monthly report in excel for the month of August.
Then when it comes to September, I will need to do some changes to it.
The macro will run and color the cell background to all those cells
that are edited (different from August).

Then in October, the same thing happens again. Any bright ideas?

*** Sent via Developersdex http://www.developersdex.com ***
 
S

Shasur

Hi

You can try like the following

Private Sub Worksheet_Change(ByVal Target As Range)
Target.Interior.ColorIndex = 35
End Sub

Cheers
Shasur
 
S

Shawn lee

Hi,

It works, but what I want is when some changes is made then it change
the cell background color. For this code, if for example the original
value in the cell is 1 then if you type 1 into the cell again, it
changes color.

Do you have something where by if you key 1 in it, it wont change color
but when you key something else maybe 2 or 100 then it changes color.

Anyway its already a big step forward. Thanks dude

*** Sent via Developersdex http://www.developersdex.com ***
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top