Skip to main content
Known Participant
October 20, 2022
Answered

Counter with Slider Control - Add space

  • October 20, 2022
  • 3 replies
  • 1652 views

Hi!

I can't find the solution to something I thought can be easily fixed.

I created a very basic counter, going from 100 € to 2000 €.

So the Slider Control effect is applied on a solid, and I applied this expression to the Source Text:

 

Math.round(thisComp.layer("counter").effect("Slider Control")("Slider")) + " €"

 

However, I would like the numbers above 999 to be spelt with a space. So basically: "1 000", instead of "1000".

I found the expression "addComas", but nothing for the space.

 

Can you help me on that?

 

Thanks!

Correct answer Adam24585301qycn

I believe you can replace the comma with a space in line 26 ( I think )

3 replies

Sung Yohaan
Participant
March 6, 2026

Yes, you can format the number with spaces instead of commas by slightly modifying the expression that handles the delimiter. Since the separator is just a character, replacing the comma with a " " (space) will display values like 1 000 or 1 500 correctly. This kind of formatting Tally Counter presents readable counts for users—adding spacing or separators simply improves clarity when numbers become larger.

Mylenium
Legend
October 20, 2022

It doesn't matter what you add as the delimiter. A space is just the same as a comma and it's added with an " " or a"\s".

 

Mylenium 

Mylenium
Legend
October 20, 2022

http://www.motionscript.com/design-guide/counter.html

 

Really nothing else required.

 

Mylenium 

Known Participant
October 20, 2022

Thank you but unless I didn't understand it well, this is for adding comas, right?

What I need is adding blank spaces. "1 000", "1 500"... no coma, no dot.

 

Is there any chance I can make this happen with a bunch of code lines?

 

Thanks!

Adam24585301qycn
Adam24585301qycnCorrect answer
Inspiring
October 20, 2022

I believe you can replace the comma with a space in line 26 ( I think )