Concat numbers and strings in a cell

Post Reply
bisewski
Posts: 6
Joined: Wed Feb 05, 2025 2:15 pm

Concat numbers and strings in a cell

Post by bisewski »

Hi. I am trying to concat two different values in a table cell:
I have something like: #B1*#C1. It is working fine resulting a number.

But I also want to add "Total: " string value.

I tried to search for concat, concatenation but no luck.

So the ideia is "Total: " & #B1*#C1 (this is not working)

another point is that when I use TEXTVALUE= "0502513" is only showed 502513. Can I fix it?

Thank you.
bisewski
Posts: 6
Joined: Wed Feb 05, 2025 2:15 pm

Re: Concat numbers and strings in a cell

Post by bisewski »

STRING(5*5;1)+"%"

:wink:

But there are another BIG problem. I am losing variables registers when I save, close and open again the file. "Unkown Variable"

And even using: BUDGET = STRING("05022513";1) I am still receiving as value 5022513
Jossi
SoftMaker Volunteers
SoftMaker Volunteers
Posts: 1275
Joined: Fri Dec 05, 2003 10:47 pm
Location: Luebeck, Germany

Re: Concat numbers and strings in a cell

Post by Jossi »

Why don't you simply write „Total: “ into the cell and then add the calculation? And in which context do you need 05022513 as part of a calculation?
bisewski
Posts: 6
Joined: Wed Feb 05, 2025 2:15 pm

Re: Concat numbers and strings in a cell

Post by bisewski »

Hi Jossi, thank you!

About Total: is just an example, I did it but could be insert a "$" or "%".

And the value is not a value, but a string that represent a Budget file...Like an unique id. They use zeros in the left side too.

What is curious is if I use it: BUDGET = "05022513" will work, but in other field if I only call BUDGET, the string will be 5022513.
I also tried STRING(BUDGET;1) but the same issue...
Jossi
SoftMaker Volunteers
SoftMaker Volunteers
Posts: 1275
Joined: Fri Dec 05, 2003 10:47 pm
Location: Luebeck, Germany

Re: Concat numbers and strings in a cell

Post by Jossi »

I cannot quite follow you. Could you give us a sample document (with dummy values)?
bisewski
Posts: 6
Joined: Wed Feb 05, 2025 2:15 pm

Re: Concat numbers and strings in a cell

Post by bisewski »

Sorry Jossi. Since you said that cant replicate it I started everything again and, my shame, I was saving in .doc file. :o

After I saved it to .tmpx the problem with the variables disappeared. MY fault.

The only thing that I cant fix is about numbers now. This ID number that can be 000025 for instance, even I trying to convert it to STRING("000025";1) doesnt work for me. I am receiving "25"

Cant you replicate it too?
bisewski
Posts: 6
Joined: Wed Feb 05, 2025 2:15 pm

Re: Concat numbers and strings in a cell

Post by bisewski »

Here I left an exemple of the number issue.

One approach that can help us is to use space in the begin of the string. That work around solve the problem.
Test_000025.tmdx
(12.96 KiB) Downloaded 41 times
Jossi
SoftMaker Volunteers
SoftMaker Volunteers
Posts: 1275
Joined: Fri Dec 05, 2003 10:47 pm
Location: Luebeck, Germany

Re: Concat numbers and strings in a cell

Post by Jossi »

You are right. There is a bug in TextMaker.
In the attached sample document, in the first line I define a variable named ID: ID="0025". By adding quotation marks, i have marked the value 0025 as a text string, not a number.
But if I call this variable again in another calculation, the text string is changed into a number and loses the leading zeros (cf. second line). There is no way to prevent this; using the formula STR(ID) in the third line gives the same result (as was to be expected because STR works only with a number as input, so TextMaker clearly interpretes the original 0025 as a number here).
SoftMaker should have a good look at this issue.

Inserting a blank at the beginning of the string as you describe it is one possible workaround. Another one would be to set the original text string in a text box and referring to the text box content (see section II), a third one to pack everything into a table (see section III).
Attachments
Text string to number.tmdx
(14.66 KiB) Downloaded 35 times
bisewski
Posts: 6
Joined: Wed Feb 05, 2025 2:15 pm

Re: Concat numbers and strings in a cell

Post by bisewski »

Using textBox is also a good approach. Thank you!

Probably what is happining is that TextMaker is trying to convert the string to a value using Try Catch, so "00025" can converted to a number resulting in a true acceting the Try and " 00025" is failing so going to Catch returning a string.

But anyway, I am very impressed with this tool. Is my first time using it and it dealt with my .docx without any issues... So for a basic use this Free version is very powerful.

Thanks to the developers for giving us such a great tool for FREE.
SuperTech
SoftMaker Team
SoftMaker Team
Posts: 3263
Joined: Wed Mar 11, 2020 5:31 pm

Re: Concat numbers and strings in a cell

Post by SuperTech »

Thank you for posting your problem. I have forwarded the details for further investigation.
bisewski wrote: Sat Feb 08, 2025 4:03 pm Thanks to the developers for giving us such a great tool for FREE.
Are you using FreeOffice or SoftMaker Office NX/2024?
Post Reply

Return to “TextMaker NX and 2024 for Windows”