Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
compare oldvalue and new value of a cell
Hi All,
how to write a code to compare the value of a cell before it's being updated by user.If the new value is different with the new value,I want the cell background colour become different.But since I have many sheet in my workbook,I want the code become public and I try to keep the sheet clean from any vba code. Thank's Shiro |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
compare oldvalue and new value of a cell
Hi,
This may help. Right click your sheet tab, view code and paste this in Private Sub Worksheet_Change(ByVal Target As Range) If TargetVal < Target Then Target.Interior.ColorIndex = 3 TargetVal = vbNullString End If End Sub Private Sub Worksheet_SelectionChange(ByVal Target As Range) TargetVal = Target End Sub Mike "shiro" wrote: Hi All, how to write a code to compare the value of a cell before it's being updated by user.If the new value is different with the new value,I want the cell background colour become different.But since I have many sheet in my workbook,I want the code become public and I try to keep the sheet clean from any vba code. Thank's Shiro |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Compare text string of a cell in Column A VS another cell in Colum | Excel Worksheet Functions | |||
Compare text string of a cell in Column A VS another cell in Colum | Excel Programming | |||
Listbox OldValue | Excel Programming | |||
How do I compare cells and if FALSE compare to next cell in EXCEL | Excel Worksheet Functions | |||
OldValue property | Excel Programming |