Is there any way i can convert number to text format but still following the number format for comma

sarathchinta1
New Contributor

Is there any way i can convert number to text format but still following the number format for comma

Unable to convert number to Text following comma format, Could anyone help me out of this problem?

 

sarathchinta1_1-1619116847914.png

sarathchinta1_2-1619116877741.png

Thanks in advance

 

 

 

 

5 REPLIES 5
rob_marshall
Moderator

Re: Is there any way i can convert number to text format but still following the number format for c

@sarathchinta1 

 

May I ask what exactly are you attempting to accomplish?  Why are you wanting to turn a number into a text?  I ask because that formula is nasty from a performance standpoint.

 

Rob

sarathchinta1
New Contributor

Re: Is there any way i can convert number to text format but still following the number format for c

For Requirement. But Problem has been solved. Thank you for your immediate response.

MarkWarren
Expert

Re: Is there any way i can convert number to text format but still following the number format for c

I would challenge that requirement!
You should try to avoid using text and converting numbers to text seems unnecessary.

Have a look at my recent article, Memory Usage From Text Concatenation  the same info applies here. Text manipulation creates a lot of memory overhead and uses (and throws away a lot of) memory in the calculation.

This can lead to problems at large scale model sizes.

ChrisHeathcote
Community Boss

Re: Is there any way i can convert number to text format but still following the number format for c

@sarathchinta1 

Wozza, that is a crazy formula.

However, there are several hoops to jump through to return the correct text string.

I would echo @rob_marshall comment here and question why you need to do this. 

Here is my approach. 

I have split this out across multiple line items as there are several IF THEN ELSE statements that need to come together. The main issue I faced is ensuring that the reference used to pull in the thousands shifted depending on the length of the number. 

This example also only goes up to the millions.

ChrisHeathcote_0-1619169271633.png

 

ChrisHeathcote_1-1619169316177.png

ChrisHeathcote_3-1619169349012.png

 

ChrisHeathcote_4-1619169367182.png

 

ChrisHeathcote_5-1619169395488.png

 

ChrisHeathcote_6-1619169419502.png

 

ChrisHeathcote_8-1619169520103.png

 

 

 

Chris Heathcote
Bedford Consulting

Gold Partner and Regional Partner of the Year 2021, EMEA
sarathchinta1
New Contributor

Re: Is there any way i can convert number to text format but still following the number format for c

Thank you for immediate response. That would be great way to solve my problem.