Multiple "if cell contains partial text" in same formula

kitebud

New Member
Joined
Jul 18, 2022
Messages
3
Office Version
  1. 2019
Platform
  1. Windows
Hi,

Source: Excel if cell contains partial text - Excel

I've successfully added this function to my spreadsheet: =IF(COUNTIF(A2,"*PartialText*"),"Yes","No")

I'm wondering how do you add multiple countif(s) in the same formula ? For example, if a cell contains some text, then display this…but if it contains another text, then display something else, and so on ?

thanks

Christian
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Hello!

Book5
AB
1NameResult
2ChrisChristian
3TomTommy
Sheet1
Cell Formulas
RangeFormula
B2:B3B2=IF(COUNTIF(A2,"*Tom*"),"Tommy",IF(COUNTIF(A2,"*Chris*"),"Christian","No"))
 
Upvote 0
Hi Joe4

thanks, I tried this before and it doesn't work with the formulas I have in which I use a wildcard *text*
 
Upvote 0
Hi Joe4

thanks, I tried this before and it doesn't work with the formulas I have in which I use a wildcard *text*
This isn't particularly helpful in helping us to try to help you (it is too general/generic).

Please give us detailed data and examples of exactly what you are trying to do (do not oversimplify it), and include any formulas.
You don't have to give us a ton of data, just enough to show the different possibilities.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0
Hi Hrayani,

thanks a lot, this is exactly what I was looking for and works great!
Note that is just applying a nested IF formula to what you originally had, which is exactly what I was suggesting.
 
Upvote 0
Hi Hrayani,

thanks a lot, this is exactly what I was looking for and works great!

You are welcome, but, listen what the Admin says in POST # 5
try following it in your future posts
 
Upvote 0

Forum statistics

Threads
1,213,563
Messages
6,114,332
Members
448,566
Latest member
Nickdozaj

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