Processing a bank statement. Trivial problem.
I’m trying to show a copy of the ‘In’ amount in a different column if the corresponding description contains a specific string (such as ‘Interest’). These can then give a column total of all ‘Interest’ rows.
I would expect
IF(SEARCH(“Interest”, D6, 1) > 0, F6, “”)
(for row 6 where the description is in column D and the ‘In’ payments are in column F)
to work, but on the rows where ‘Interest’ is not found, the cell shows ‘#VALUE!’.
I guess that the SEARCH function does not return a numeric value if a match isn’t found, but the documentation doesn’t say what is returned so I can’t allow for it.
How to achieve this?
Been a programmer for nearly 50 years, but of course a spreadsheet function isn’t a programming function.
David
Many thanks to Lupp and Earnest Al. ISNUMBER solves the problem.