Simple Find Text problem

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?
 
L

Leith Ross

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
 
D

Dave Peterson

A couple of ways:

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top