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

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
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,915
Messages
6,122,217
Members
449,074
Latest member
cancansova

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