Hi Don!
I suppose that you could regard the Worksheet_Change event handler as
a form of embedding a formula in a cell. When an entry is made in a
Target cell, the event handler kicks in.
The suggested formula approach involves the formula being placed in a
cell immediately to the right of the data entry cell.
=IF(-ABS(A1)=0,"",-ABS(A1))
Whilst A1 is empty the formula will evaluate to 0 and it will return a
blank. As soon as a numeric entry is made -ABS(A1) will ensure a
negative result. But these two returns are both returns to the
adjacent cell. A formula or function can only return a value. There's
nothing that you can put in an empty cell that can act upon a
subsequent entry into that cell. You can pre-format a data entry but
that only governs how the cell contents will look; it won't affect
what is stored. Similarly, you can use Data validation to control what
can be put in a cell but it won't change it when it is input.
--
Regards
Norman Harker MVP (Excel)
Sydney, Australia
[email protected]
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.