Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

curmudgeonette

macrumors 6502a
Original poster
I'm using Apple Numbers to compile raw data into a markup language. I've discovered that Numbers is changing certain characters in string constants in my formulas when I go to edit them. I needed to change

=CONCATENATE("<!--the answer is 42-->")

into

=CONCATENATE("<!--the answer is ",G1,"-->")

After editing the formula, I discovered it is now:

=CONCATENATE("<!––the answer is ",G1,"––>")

This looks almost the same, but the minus signs have been changed into en-dashes! As I'm generating essentially program code, this won't work. Grrr!!! 😡

It looks like the change happens when the formula is brought into the editing window. It also looks like strings shorter than some length stay unchanged. So I have a workaround of coding each dash as a single character string:

=CONCATENATE("<!","-","-","the answer is ",G1,"-","-",">")

BTW, I also observed a "/" in a longer string get changed into a divide sign.
 
Have a look in system preferences > keyboard > auto correct

There might be an option that turns two hyphens into a long dash - typographically correct, but no good for spreadsheets!
 
Have a look in system preferences > keyboard > auto correct

There might be an option that turns two hyphens into a long dash

I have everything like that turned off. No substitutions, no smart quotes, nothing!

Besides, the problem doesn't happen when typing. I can type in what I want and it will take it just fine. The formula will be working correctly for a long time. But when I double click to edit the formula, it gets changed on me.
 
How about this option?

(Sorry if you've done this... I don't use Numbers or excel much!)
4bc1a640479a4d5c0e9912a52eab53fa.jpg
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.