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
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
theres definitely a better way to do it but the below works for me.

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

=IFERROR(IF(LOOKUP(1,1/(SEARCH({"trsf","branch deposit"},K4))),C4),"")
 
Upvote 0
theres definitely a better way to do it but the below works for me.

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

This won't work unless the search value is the 1st text.

Try
=IF(ISNUMBER(SEARCH("Branch Deposit",K4)),C4,IF(ISNUMBER(SEARCH("TRSF",K4)),C4,""))
 
Upvote 0
Code:
[TABLE="width: 576"]
<tbody>[TR]
[TD]Formulas[/TD]
[TD="align: right"]55[/TD]
[TD="align: right"]55[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Formulas[/TD]
[TD="align: right"]77[/TD]
[TD="align: right"]77[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]55[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="colspan: 3"]fd  tgb  dbranch deposit posit advga[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: right"]77[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="colspan: 2"]adcv cvdS TRSF FVAEC[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
Gaz.....this one works

= IFERROR(IF(LOOKUP(1,1/(SEARCH({"trsf","branch deposit"},K4))),C4),"")

Excellent...thank you both.
 
Upvote 0

Forum statistics

Threads
1,214,793
Messages
6,121,619
Members
449,039
Latest member
Mbone Mathonsi

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