document updated 15 years ago, on Feb 20, 2009
Unintuitive or otherwise unexpected useful little tidbits.
- to get the numerical-value for a cell, but to return 0 if the cell isn't numerical, there are two things you can do:
- the most obvious: =IF(ISNUMBER(A1),VALUE(A1),0)
- not obvious at all: =MAX(A1,A1)
(don't ask me why this works, but it does... at least in Office 2003)
(almost every other function returns #VALUE! when taking an argument that *should* be a value, but is not)
(one question is why Excel doesn't just do implicit type coercion most of the time)
(the other is: why does it only do it in one or two instances?)