# How to convert text to number and vice versa

**URL:** <https://community.thunkable.com/t/how-to-convert-text-to-number-and-vice-versa/1416299>\
**Category:** Questions about Thunkable X\
**Created:** [July 27, 2021, 9:19am UTC](https://community.thunkable.com/t/how-to-convert-text-to-number-and-vice-versa/1416299 "2021-07-27T09:19:52Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![overturner](https://avatars.discourse-cdn.com/v4/letter/o/53a042/32.png) [@overturner](https://community.thunkable.com/u/overturner)\
**Post date:** [July 27, 2021, 9:19am UTC](https://community.thunkable.com/t/how-to-convert-text-to-number-and-vice-versa/1416299/1 "2021-07-27T09:19:53Z")

</div>

Hi i searched the forum but couldnt find an answer. How can i convert a text from a list to a number?

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [July 27, 2021, 9:53am UTC](https://community.thunkable.com/t/how-to-convert-text-to-number-and-vice-versa/1416299/2 "2021-07-27T09:53:10Z")

</div>

if the text is already numerals then just add 0 to it or multiply it by 1

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/b/9/b97b62dcfbf0a89f9c3f0c6e54d3d593bed88771.png)

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [July 27, 2021, 10:03am UTC](https://community.thunkable.com/t/how-to-convert-text-to-number-and-vice-versa/1416299/3 "2021-07-27T10:03:31Z")

</div>

Right. And to convert a number to text, you can join it with an empty string ("").

@overturner If you’re needing to convert a list to a number… can you explain that? Do you actually mean a list variable/value? Or do you just mean a text string? Can you give an example?

---

<div class="post-metadata">

**Author:** ![overturner](https://avatars.discourse-cdn.com/v4/letter/o/53a042/32.png) [@overturner](https://community.thunkable.com/u/overturner)\
**Post date:** [July 27, 2021, 10:37am UTC](https://community.thunkable.com/t/how-to-convert-text-to-number-and-vice-versa/1416299/4 "2021-07-27T10:37:31Z")

</div>

For example i have a list : 2.456 , 3.256 , 562.234 , 21.56  
Then i want to add all these  
So i use a sum of list function and it gives me the actual sum. But when i dont give it a defined list then it gives me 2.4563.256562.234 etc  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/d/5d600153a70735836217a2ae0beb55c4c9c5665e.png)  
My code :  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/5/25c35983aa965c2faa8d25f0faa034ce133eec1d.png)

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [July 27, 2021, 10:46am UTC](https://community.thunkable.com/t/how-to-convert-text-to-number-and-vice-versa/1416299/5 "2021-07-27T10:46:18Z")

</div>

You need to use a loop and add the individual entries by adding 0 and then add it to the running sum.

---

<div class="post-metadata">

**Author:** ![overturner](https://avatars.discourse-cdn.com/v4/letter/o/53a042/32.png) [@overturner](https://community.thunkable.com/u/overturner)\
**Post date:** [July 27, 2021, 10:48am UTC](https://community.thunkable.com/t/how-to-convert-text-to-number-and-vice-versa/1416299/6 "2021-07-27T10:48:20Z")

</div>

🥳 🥳  
Thank you so much @muneer and @tatiang  
My issue is resolved. What i had to do :

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/3/93f4cdf2e10c2d0f0d7fc00b844dd6490163958c.png)

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 1:17pm UTC](https://community.thunkable.com/t/how-to-convert-text-to-number-and-vice-versa/1416299/7 "2024-11-08T13:17:48Z")

</div>


