Got it - the difference is in if there are spaces before and after the dash - if there are then both versions of my formula work fine but yours doesn't, if there are not then your formula and the corrected version of mine work, but the uncorrected version doesn't.

As we haven't heard back from the OP the point is probably moot.