Simple Find Text problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do I simply find text in a string within a cell and if true add the value
from another string and if false simply keep the current value for a running
total. When I enter the formula

IF(FIND(B15,"FEE"),E14,E14+C15)

It returns the #VALUE! error.

In this example I am placing this in cell E15 to create a running total of
all fees charged.

How do I format the formula to get an IF THEN ELSE type solution?
 
Hello Sammy

The Find function returns a #Value! error if the string you ar
searching for is not found. To make your code work, you need to tes
for the error. Did you mean to search for the value of B15 in "FEE" o
vice versa. I assumed the opposite.

*Revised Formula:
= IF(ISERROR(FIND("Fee", B15))=FALSE, E14, E14+C15

Sincerely
Leith Ros
 
A couple of ways:

=E14+ISNUMBER(SEARCH("fee",B15))*C15
or
=E14+IF(ISNUMBER(SEARCH("fee",B15)),C15,0)
 
Back
Top