excel formula if cell contains

BORUCH

Well-known Member
Joined
Mar 1, 2016
Messages
529
Office Version
  1. 365
Platform
  1. Windows
hi

i would like if someone can provide me with a formula that checks a cell if it contains a lowercase x if it does then ... if not then ...

Another condition for the if statement is that the lowercase x must be proceeded by a number any number

Thanks
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Perhaps something like
Excel Formula:
=ISNUMBER(MID(A1,FIND("|",SUBSTITUTE(A1,"x","|"))-1,1)+0)
This will not work if there is more than one lower case x in the string and the first one is not preceded by a number.
 
Upvote 0
Perhaps something like
Excel Formula:
=ISNUMBER(MID(A1,FIND("|",SUBSTITUTE(A1,"x","|"))-1,1)+0)
This will not work if there is more than one lower case x in the string and the first one is not preceded by a number.
ok sorry for not being clear enough, another thing it has to check is that its only allowed to exits once the lower case x, it cannot exits more then once in the cel. UPPER CASE i don't care
 
Upvote 0
Try
Excel Formula:
=ISNUMBER(IF((LEN(A1)-LEN(SUBSTITUTE(A1,"x","")))=1,MID(A1,FIND("|",SUBSTITUTE(A1,"x","|"))-1,1)+0,""))
There may be other factors to take into consideration that will not become obvious until the formula is tested.
 
Upvote 0
Try
Excel Formula:
=ISNUMBER(IF((LEN(A1)-LEN(SUBSTITUTE(A1,"x","")))=1,MID(A1,FIND("|",SUBSTITUTE(A1,"x","|"))-1,1)+0,""))
There may be other factors to take into consideration that will not become obvious until the formula is tested.
Thank you very much
 
Upvote 0

Forum statistics

Threads
1,215,730
Messages
6,126,528
Members
449,316
Latest member
sravya

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