Inserting IFERR Condition...

E

EU

I want to return a blank cell instead of a #VALUE! error
for the following formula:

=IF(Inventory_MD_Location<>" ",RIGHT(Inventory_MD_Location,
(LEN(Inventory_MD_Location)-FIND("*",SUBSTITUTE
(Inventory_MD_Location,",","*",LEN(Inventory_MD_Location)-
LEN(SUBSTITUTE(Inventory_MD_Location,",",""))))-1)),"NO
DATA")

The formula pulls the last word in the string (to the
right of the last comma):

For example, it pulls "Baltimore" from the following
string: 241-02 Northern Blvd, 24102N_1, 24102N_1_,
Baltimore

I tried to insert an "IF(ERR" condition, but I can't get
the back end of the formula right (to return a blank
cell).

Thanks.

EU
 
J

J.E. McGimpsey

One way:

=IF(ISERR(FIND(",", Inventory_MD_Location)), "",
TRIM(MID(Inventory_MD_Location, FIND("*",
SUBSTITUTE(Inventory_MD_Location, ",", "*",
LEN(Inventory_MD_Location) - LEN(SUBSTITUTE(Inventory_MD_Location,
",", ""))))+1, 255)))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top