How to specify non-breaking space on Mac Excel – Mac version of char(160)

internationalizationms office

On Windows, you can specify non-breaking spaces in Excel formulas with char(160), for example:

=A1&char(160)&A2
=substitue(cell_ref,char(160),"")

On Excel for Mac (2011), however, char(160) maps not to the non-breaking space character, but to the "dagger" character, † ().

What's a Mac-friendly way to specify non-breaking space? (this is probably very easy for anyone who knows what encoding Mac Excel uses and how to look up character codes)

I can input a non-breaking space with opt-space, and Excel (so far) seems to treat it as a non-breaking space, but it's not great for readability – in a formula, it looks just like any space.


Bonus points for any answer that works consistently between Windows and Mac versions of excel – but for this question, Mac-only is enough

Best Answer

try char(202) instead of char(160). That seems to be the code in Excel Mac

The reason is that your Excel Mac is working in the old MacRoman character set, where 160 is a dagger (U+2020) and 202 is a no break space (U+00A0)

http://www.alanwood.net/demos/macroman.html