IF/ SEARCH Functions

gldurand

Board Regular
Joined
Jun 8, 2006
Messages
178
Office Version
  1. 2016
Platform
  1. Windows
Hi Folks,

I have (Column F) that contains a string of "text" with the words "Measured" or "Non Measured" found in most of them. I have been able to categorise these records with the following formula

=(IF(SEARCH($N$1,F2)=1,"Measured","Non Measured"))


My challenge is that if there is no indication of these two words, then i get the return error of #VALUE!. I need to say that anything that is not "Measured" should be "Non Measured"

So if I have "Measured" in the first character, then should be "Measured", otherwise every other instance should be "Non Measured"

Any assistance would be appreciated

Thanks
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
=IF(ISNUMBER(SEARCH($N$1,F2)),"Measured","Non Measured")
or slightly shorter:
=IF(ISERROR(SEARCH($N$1,F2)),"Non ","")&"Measured"
 
Upvote 0
Does not seem to work, not giving me the results i need.

i have the following strings

Non-Measured-Customer-Environment-Power
Non-Measured-Dropped and Recovered
Measured - Customer -Phone -Helpdesk
Other
Measured - Router Config


I want to say that if String starts with Measured, then it is "Measured" otherwise it should indicate "Non Measured"

Thanks
 
Upvote 0
Your use of SEARCH implied you wanted to search the entire cell content, not whether or not the cel started with specific text.

Excel Workbook
AB
1Non-Measured-Customer-Environment-PowerNon Measured
2Non-Measured-Dropped and RecoveredNon Measured
3Measured - Customer -Phone -HelpdeskMeasured
4OtherNon Measured
5Measured - Router ConfigMeasured
Sheet1
 
Upvote 0
Does not seem to work, not giving me the results i need.

i have the following strings

Non-Measured-Customer-Environment-Power
Non-Measured-Dropped and Recovered
Measured - Customer -Phone -Helpdesk
Other
Measured - Router Config

I want to say that if String starts with Measured, then it is "Measured" otherwise it should indicate "Non Measured"

Thanks
Try this...

=IF(LEFT(A2,8)="Measured","Measured","Non-Measured")
 
Upvote 0

Forum statistics

Threads
1,224,503
Messages
6,179,135
Members
452,890
Latest member
Nikhil Ramesh

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