IF ISERROR and FIND based on multiple criterias

DIARYTODAY

New Member
Joined
Apr 29, 2015
Messages
23
Hello, please help me, im stuck.

So here is my table:
Table 1: EE Name(A1), prospect name (B1)(name is very long, i.e: AEM-xxxxxx, AEM-yyyyy, AEM-Advanced,etc..., AEP-xxxxx, AEP-zzzz,.... (AEM, AEP...are client names)
Table 2: EE Name (C1), prospect abbreviation (D1)

I need to abbreviate prospect names to calculate the rate for that client, AEM and AEP are same client (just diff entity), Advanced prospect has different rate so it has to be abbreviated as AEP- ADV, so my formula on D1 is:

=IF(ISERROR(FIND("AEM"&"ADVANCED",B1)),LEFT(B1,3),"AEP"&LEFT(B1,3)&" - ADV") It does not work

I also try
=IF(ISERROR(FIND("ADVANCED",B1)),LEFT(B1,3),LEFT(B1,3)&" - ADV")+IF(ISERROR(FIND("AEM",B1)),LEFT(B1,3),"AEP") but does not work either

thank you in advance
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
In your first formula, you are concatenating the strings AEM and ADVANCED, so your search string is AEMADVANCED, which is not what I think you want.
Why are you using FIND instead of just = ?

Does this do what you want?

=IF(B1="AEM-ADVANCED","AEM",LEFT(B1,3) & " - ADV")
 
Upvote 0
Thank you Scott, that formula wont work because AEM and AEP is just 2 clients out of 100 client names I have (ie. AEM-xxxx, RRC-xyxyxy, VPC-yyyy, AEP-zizizi, CLP-ghghghh, PLM-shshshhs,..and many more). All prospects can be distinguished by the 3 letter abbreviation for that client..

So while this formula works for me:
=IF(ISERROR(FIND("ADVANCED",B1)),LEFT(B1,3),LEFT(B1,3)&" - ADV") which will find those with "ADVANCED" and give me RRC - ADV, or PLM - ADV, etc which is what I want.

Then I realize it could not find AEM, so I need Excel to find AEM also and interpret as AEP since they are same client, just diff entity. Does that make sense?
 
Upvote 0
OK, Try this:

=IF(LEFT(B1,3)="AEM","AEP",LEFT(B1,3))&IF(ISNUMBER(FIND("ADVANCED",B1))," - ADV","")
 
Upvote 0
Hi Scott,

So I can better understand how your formula works, can you explain the 2nd phrase IF(ISNUMBER(FIND("ADVANCED",B1))," - ADV","")? why"" at the end?
 
Upvote 0
If it finds the text ADVANCED, it will return a number of the position of where it found it. So if a number is returned, it found the text and we will add " - ADV", otherwise we will add an empty string, essentially nothing, to the end if it doesn't find it.
 
Upvote 0

Forum statistics

Threads
1,215,221
Messages
6,123,699
Members
449,117
Latest member
Aaagu

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