I. Description
In the process of setting up reports, we may often need to perform string splicing in cells. Some people may first reflect the use of the string splicing symbol '+'. Of course, this symbol is completely feasible for general string splicing. But if the content to be spliced is a digital string, then there is a problem. as the picture shows:
Note: The result we want to get is 0011201110, and the result obtained by ‘+’ splicing is 1201111
II. Ideas
The reason is that there is a mechanism in FR's formula processing. For the plus sign "+", if both sides are numeric strings, it will become a digital addition, and the result is the sum of two numbers.
Example: The result of "001" + "1201110" is: "1201111" instead of: "0011201110".
If you want to force the use of strings, you can use the string concatenation formula CONCATENATE(), and this problem will not exist.
Formula 1: CONCATENATE("001", "1201110"), return result: "0011201110".
Formula 2: CONCATENATE("abc", "def"), return result: "abcdef".
III. Example
1. Template Design
1) Create a new normal report and set the formula in the cell, as shown in the figure below:
Serial Number | A(Formula) | B | C(Result) |
1 | "001" + "1201110" | <====> | ="001" + "1201110" |
2 | CONCATENATE("001", "1201110") | <====> | =CONCATENATE("001", "1201110") |
3 | "00" + "1201110" | <====> | ="00" + "1201110" |
4 | CONCATENATE("00", "1201110") | <====> | =CONCATENATE("00", "1201110") |
5 | "0" + "1201110" | <====> | ="0" + "1201110" |
6 | CONCATENATE("0", "1201110") | <====> | =CONCATENATE("0", "1201110") |
7 | "abc" + "def" | <====> | ="abc" + "def" |
8 | CONCATENATE("abc", "def") | <====> | =CONCATENATE("abc", "def") |
2)The content of the template is shown in the figure below:
2. Effect Preview
1) PC
Save the template and click Pagination Preview, as shown in the figure below:
2) Mobile
3. Summary
1)'+' is fully applicable to the splicing of non-digital strings, but not applicable to digital strings;
2) Concatenating strings with CONCATENATE() is compatible (recommended).