In the formula tool, I am using [column 1] + [column 2] but there is a space in between in the output column. How do I separate with comma?
@richleeb2
I am wondering where the space comes from.
If you want to add commma, you can do like this.
[column 1] + ','+ [column 2]
If column 1 is blank, then the output starts with a comma.
",[column 2]"
How do I skip the comma if there is no value? FYI I have 3 columns of values.
@richleeb2
maybe like this
If isempty([column 1]) then [colum 2] else
[column 1] + "," + [column 2]
endif
Some sample data would be good.
I have 3 columns I need to pull from to a 4th output column, separated by commas. Some fields could be blank
Column 1 | Column 2 | Column 3 | Output |
horse | pig | horse, pig | |
bird | fish | bird, fish | |
cat | snake | dog | cat, snake, dog |
@richleeb2
Data is always better 😁
We can use the Summarize tool instead of lengthy formula, which is also dynamic
Thanks, I was able to use this formula and it worked
Trim(Replace(Trim([Column 1]," ") + ', ' + Trim([Column 2]," ") + ', ' +Trim([Column 3]," "), ", ,", ", "),", ")
User | Count |
---|---|
52 | |
27 | |
25 | |
24 | |
21 |