Code:
Private Sub Worksheet_Calculate()
        For Each C In Worksheets("Sheet1").Range("test").Cells
            C.Value = Right(C.Value, 2)
            
        Next
        
End


My install of Excel is broken, the help for VBA isn't working. But the above is a start.

If you rt-click on the sheet's tab, choose view code, and put the above in the code for that sheet. It will run whenever the spreadsheet recalculates. All it does is trim the contents of the cells in the named range to have only the last 2 chars. (you need to have a range named test predefined)

To complete this the comparison and revision code needs to be added and a suspension and resumption of auto recalculation has to be added, as this code runs endlessly. esc will exit the loop.


Edited by gbeer (27/03/2010 02:26)
_________________________
Glenn