surkdidat

Well-known Member
Joined
Oct 1, 2011
Messages
579
Office Version
  1. 2016
How do I amend the code in

IF(ISNUMBER(SEARCH"XXX" ...etc

so if it ISNT "XXXX" please
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Apologies, I rushed the post as I had to go off to a meeting!!

I have

Code:
IF(ISNUMBER(SEARCH("XXXX",K5)),K5,........

However, I want it to look at the value in K5, and if it does not contain XXXX then I want it to display that value, if it contains XXXX, I need it to move onto the next part of my logic
 
Upvote 0
Like:


Excel 2010
KL
5dssdddssdd
6dssddXXXXjklznext step
Sheet5
Cell Formulas
RangeFormula
L5=IF(ISERROR(SEARCH("XXXX",K5)),K5,"next step")
 
Upvote 0
Hi there

It needs to CONTAIN "XXXX" so this can be anywhere in the text in the relevant field....[

QUOTE=sheetspread;5029051]Like:

Excel 2010
KL
5dssdddssdd
6dssddXXXXjklznext step

<colgroup><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet5

Worksheet Formulas
CellFormula
L5=IF(ISERROR(SEARCH("XXXX",K5)),K5,"next step")

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>

[/QUOTE]
 
Upvote 0
If the target in K5 must contain "XXXX", then:

=IF(ISNUMBER(LOOKUP((9.99999999999999E+307,SEARCH("XXXX",K5)),"next step",K5)

If the target in K5 must NOT contain "XXXX", then:

=IF(ISNA(LOOKUP((9.99999999999999E+307,SEARCH("XXXX",K5)),"next step",K5)

Note that these will not distinguish between XXXX and XXXXX.
 
Upvote 0

Forum statistics

Threads
1,213,543
Messages
6,114,236
Members
448,555
Latest member
RobertJones1986

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