# Calc. Line up two columns in one cell, or using a tab between two numbers

I want to show estimates of people in poverty, with confidence intervals (CI), all in one column. I’ll have county name in another column, so the problem is the column with the numbers. I’m going to show all this in tableau, eventually.

Here is the problem. The number of people estimates parts vary in size from around 2,000 to around 258,205, so the number of digits in the estimates vary a lot. Consequently the part showing the CI won’t line up. I would like them to line up, if possible.

Example data:

71,540 (70,482 - 72,598)
258,205 (255,880 - 260,530)
50,295 (49,587 - 51,003)
232,350 (230,421 - 234,279)
2,080 (1,951 - 2,209)

Thanks

and depending on the font used, width will vary too.

why not splitting into 2 columns ?

Hi fpy.
Thanks, but I want one column because later I’ll also be adding in percents, which don’t have CI, so then the extra column would be a blank column.

Thanks though.

I guess you use now some concatenation like
`A1&" ( "&B1&" - "&C1&" )"`
.
You can get more control by convering the numbers to text with a format string.
So replace the C1 from above with something like
`TEXT(C1; "???,???")` where the ? should fill spaces, so you have always 6 chars and the “,”. Use a font, wich has equal width for all digits and the space.

https://help.libreoffice.org/latest/en-US/text/shared/01/05020301.html

Hi Wanderer
Thanks, I’ll try that. But the problem is, the first part, the counts, has different number of digits, so if I use a set number of spaces between the counts and CI, I still get the columns of CI that doesn’t line up.

Right now, actually, I’m using this, which another person had suggested in another question of mine.
=TEXT(D2,"#,##0")&" “&” ("&TEXT(F2," #,##0")&" - “&TEXT(G2,” #,##0")&")"

I was hoping for some kind of tab but I tried a couple things, that didn’t work.

Align the cell to the right then. For digits this would be default.
.
Or use two columns. As you concat yourself, you don’t need the regular expressions provided by @fpy
.
And using ? instead of # should fill also the first item of your string to align properly…