Finding text (A) or text (B) and returning text depending on what was found

StephR

New Member
Joined
Jun 8, 2021
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi! I'm attempting to create a formula that will search an export of our memos for "% of" or "spend" and return "Fee" AND search for "Direct Bill" or "Fronted" and return "Pass-through". If neither of those are present I would like it to return "Check manually". Any idea if this is possible? The goal is to be able to filter by "Fee" or "Pass-through" for the past few years of data.

DateTransaction TypeNumCustomerMemo/DescriptionFee / Pass-Through
Product
1/1/2020Invoice123ABCProduct - 5.499% of $100,000
2/1/2020Invoice234ABCProduct Spend - 5.5% of $50,000
3/1/2020Invoice345ABCProduct Test
4/1/2020Invoice456ABCProduct Test - Direct Bill
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Welcome to Mr. Excel,

Is this what you mean?

Book1
ABCDEFG
1DateTransaction TypeNumCustomerMemo/DescriptionFee / Pass-Through
2Product
31/1/2020Invoice123ABCProduct - 5.499% of $100,000Fee
42/1/2020Invoice234ABCProduct Spend - 5.5% of $50,000Fee
53/1/2020Invoice345ABCProduct TestCheck Manually
64/1/2020Invoice456ABCProduct Test - Direct BillPass-Through
7Test FrontedPass-Through
Sheet1
Cell Formulas
RangeFormula
G3:G7G3=IF(OR(ISNUMBER(SEARCH("Spend",F3)),ISNUMBER(SEARCH("%",F3))),"Fee",IF(OR(ISNUMBER(SEARCH("Direct Bill",F3)),ISNUMBER(SEARCH("Fronted",F3))),"Pass-Through","Check Manually"))
 
Upvote 0
Welcome to Mr. Excel,

Is this what you mean?

Book1
ABCDEFG
1DateTransaction TypeNumCustomerMemo/DescriptionFee / Pass-Through
2Product
31/1/2020Invoice123ABCProduct - 5.499% of $100,000Fee
42/1/2020Invoice234ABCProduct Spend - 5.5% of $50,000Fee
53/1/2020Invoice345ABCProduct TestCheck Manually
64/1/2020Invoice456ABCProduct Test - Direct BillPass-Through
7Test FrontedPass-Through
Sheet1
Cell Formulas
RangeFormula
G3:G7G3=IF(OR(ISNUMBER(SEARCH("Spend",F3)),ISNUMBER(SEARCH("%",F3))),"Fee",IF(OR(ISNUMBER(SEARCH("Direct Bill",F3)),ISNUMBER(SEARCH("Fronted",F3))),"Pass-Through","Check Manually"))
Yes, that worked! Thank you so much!
 
Upvote 0
A shorter way to write basically the same thing:

21 06 09.xlsm
ABCDEFG
1DateTransaction TypeNumCustomerMemo/DescriptionFee / Pass-Through
2Product
31/01/2020Invoice123ABCProduct - 5.499% of $100,000Fee
42/01/2020Invoice234ABCProduct Spend - 5.5% of $50,000Fee
53/01/2020Invoice345ABCProduct TestCheck manually
64/01/2020Invoice456ABCProduct Test - Direct BillPass-through
7Test FrontedPass-through
Fee or Pass
Cell Formulas
RangeFormula
G3:G7G3=IF(COUNT(SEARCH({"spend","%"},F3)),"Fee",IF(COUNT(SEARCH({"direct bill","fronted"},F3)),"Pass-through","Check manually"))
 
Upvote 0
Or try this in G3:

=LOOKUP(1000,SEARCH({"?*","spend","%","direct bill","fronted"},F3),{"Check manually","Fee","Fee","Pass-through","Pass-through"})
 
Upvote 0

Forum statistics

Threads
1,214,918
Messages
6,122,246
Members
449,075
Latest member
staticfluids

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