Excel - IF Formula with a FIND
<p>I have an excel document I have to process regularly, while awaiting my company to build an automated process for this, and the issue we recently found is that the formula I'm using strips can't return a result other than #VALUE! when the FIND formula fails to find the text I need it to.</p>

<p>the formula we currently have is:</p>

<pre><code>=IF(FIND("-",M2,3),RIGHT(M2,2))
</code></pre>

<p>The cells this formula checks have states, &amp; provinces in them which look like so "CA-ON" or "US-NV".
The problem is that regions for the UK don't fillout as "UK-XX" it inputs the actual county for example "Essex" or "Merryside"</p>

<p>What I need the formula to do is, if it can't find the hyphen(-) in the cell, then it should just take whatever value is there and write it in the cell the formula is in.</p>

<p>I should also mention that some of the cells are also blank, since this is an optional field. Is there anyway to run this formula where if it doesn't find the "-" it just writes whats there?</p>