Find specific text error

Pikey

New Member
Joined
Aug 4, 2004
Messages
16
I have a formulae in an Excel cell that looks at a text string and returns a code dependent on the found text. I am having to a add a similar code to one already used and have an issue with the result. The formulae is :-

=IF(ISERROR(FIND("-SL",$C$4,1)),"","SMT LED")&IF(ISERROR(FIND("-CL",$C$4,1)),"","Conventional LED")&IF(ISERROR(FIND("-B",$C$4,1)),"","Bulb")&IF(ISERROR(FIND("-LED",$C$4,1)),"","SMT LED")&IF(ISERROR(FIND("-SLR",$C$4,1)),"","SMT-LD-RD")

The two embolden characters "-SL" & "-SLR" have the same firth three character and the formulae cannot separate them.

The text string is P725-M-7W2H-6T-26A-SLR-R-FC24-G-PU or P725-M-7W2H-6T-26A-SL-R-FC24-G-PU
Resulting code should be either SMT-LD-RD or SMT-LD-RD but I get SMT LEDSMT-LD-RD

Can someone please help as it's driving me mad!

Many Thanks

Pikey
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Off the cuff, if it won't differentiate, maybe try to make the first one:

"-SL-"
 
Upvote 0
Yeah, that was my suggestion, but the team have already used this in Quotes, BOM’s and route cards. Unfortunately I’m stuck with -SLR . Do you have any alternatives that may completely replace my formula but do the same job?
 
Upvote 0
Hi,

Your comment above, what does that have anything to do with adding the hyphen (i.e. from "-SL" to "-SL-") within the formula?

=IF(ISERROR(FIND("-SL-",$C$4,1)),"","SMT LED")&IF(ISERROR(FIND("-CL",$C$4,1)),"","Conventional LED")&IF(ISERROR(FIND("-B",$C$4,1)),"","Bulb")&IF(ISERROR(FIND("-LED",$C$4,1)),"","SMT LED")&IF(ISERROR(FIND("-SLR",$C$4,1)),"","SMT-LD-RD")
 
Upvote 0
Okay take,

I see where you’re coming from let me try that and see if it sorts it out.
 
Upvote 0

Forum statistics

Threads
1,214,606
Messages
6,120,478
Members
448,967
Latest member
visheshkotha

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