Using IF with Find

Hi,

I'm trying to simplify a cell's contents, to allow better cross referencing and help eliminate issues with typos. I create cells with a serial number, someone requests that serial number though a form.

Since the serial number can have a lot of variations requests through the form can have typos leading to the cross reference failing and extra work. examples of serial numbers P1234-56, X-1234-567, and 1234-567/890, I would like to remove the "-", and remove everything to the right of the "/" (including the slash). This formula works great for removing the symbols, call that column "Simplified SN"

=SUBSTITUTE(SUBSTITUTE([Vessel's SN]@row, "-", ""), "/", "")

This works great for removing everything from the "/" on:

=LEFT([Vessel's SN]@row, FIND("/", [Vessel's SN]@row, 1) - 1)

I tried doing it in two steps, first remove the "-" (and spaces) then apply the second formula (Column "Simplified SN 2) to remove the slash and everything after it, however if there is no "/" it errors, I know I can add the IF or IFERROR, and maybe gang the SUBSTITUTE and LEFT but the syntax and nesting has me lost. The serial number in the sheet I'm cross referencing must have all the symbols and numbers (for inventory reasons), but "Simplified SN" can be reduced as in the request I am cross referencing by name (so "Name" + "Simplified SN" = yes/no.

Thanks

Best Answer

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!