Check if cell content changed

B

bbussoloti

Hi,

i´d like to know if there´s a way to, programatically or via a formula,
check if the content of a cell changed, without using an auxiliar cell to
compare.

Tks.
 
J

Jim Thomlinson

We need more info. The fact that the cell has something in it means that at
some point it changed (since all cells in a workbook are blank to start
with). Is this a file you send to someone else? Is it a shared workbook? At
what point do you want to "freeze" the contents of the cells? Do you need to
store the prior values?
 
B

bbussoloti

I do execute a routine that brings some values from other workbook to mine.
Those values will be available to be changed, but not necessarily they will
be. I just want to make that check, so I can mark with an "U" of update. If
there´s no changes, i´ll mark with "".


"Jim Thomlinson" escreveu:
 
J

Jim Thomlinson

Since I don't know where your values are that you want to capture in terms of
changing this works on the entire sheet. Right click the sheet tab and select
view code... Paste the following in the code window.

Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo ErrorHandler
Application.EnableEvents = False
Target.Offset(0, 1).Value = "U"
ErrorHandler:
Application.EnableEvents = True
End Sub
 
B

bbussoloti

Ok... the event handler is a good idea. I´ll work on it.

"Jim Thomlinson" escreveu:
 

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