Need assistance modifying a formula

kcleere

Active Member
Joined
Oct 4, 2006
Messages
314
I'm currently using the formula below to return the value in C4 if the text in K4 "contains the phrase" "BRANCH DEPOSIT" anywhere in the string.

I need to expand the formula to also return the C4 value if it finds "BRANCH DEPOSIT" OR "TRSF" anywhere in the K4 text string.

I have not been successful at adding the second condition.

= IF(COUNTIF(K4,"*BRANCH DEPOSIT*"),C4,"")

Thanks in advance.

K
 
so theoretically gaz the below should also work?

Code:
=IF(SEARCH("Branch Deposit",K4)<>"",C4,IF(SEARCH("TSRF",K4)<>"",C4,""))
 
Upvote 0

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
so theoretically gaz the below should also work?

Code:
=IF(SEARCH("Branch Deposit",K4)<>"",C4,IF(SEARCH("TSRF",K4)<>"",C4,""))

Hi Barry, no that won't work.
The search function returns a number which refers to the position of the 1st character it finds in the search string, if it doesn't find the search value it returns #VALUE!
That formula will work if it finds "Branch Deposit", but if it doesn't it will return the error #VALUE! (It won't get to the 2nd If statement).
By using e.g. ISNUMBER it returns "True" or "False" so if it sees an error it returns "False" and will go to the 2nd IF statement.

Hope that makes sense.

Gaz
 
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,560
Members
449,089
Latest member
Motoracer88

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top