I need to add several tabs in my formula so that when pasted as text the values have tabs. I use CHAR(9) for each tab, but using multiple CHAR(9)s made my formula very long, which would reach over the 8192 character limit. I could split the formula but try to avoid that because of the formula's complexity. Is there a shorter version of char(9) or other special characters? Also, is it possible to use regex keywords like \t inside the formulas?


Solution 1:

Just put the tab character in some cell, say I1, then instead of:

=A1 & CHAR(9) & B1

you can

=A1 & I1 & B1

since I1 is only 2 characters rather than 7.

Solution 2:

Better still, do as suggested, then give that cell (I1) a meaningful one-letter name, such as "T". Your formula can then become:

=A1 & T & B1