Let’s say you have a column named “TicketNumber” of number type in your list. By default SharePoint formats it to show with commas. If your requirement is not to show those comma’s then here is a workaround.
Create another column of ‘Calculated’ column type and set the formula as follows:
=TEXT(Original_Number_Column_Name,”0″)
Ex: =TEXT([TicketNumber],”0″)
And then use the calculated column in place of your original column for display purposes.
Filed under: Sharepoint

a href=”" title=”">
[...] thought this article was a brilliant workaround and wanted to share. It was original posted over at:http://sharenotes.wordpress.com/2010/05/11/workaround-format-sharepoint-number-column-to-remove-comm…Let’s say you have a column named “TicketNumber” of number type in your list. By [...]
This trick saved me time.
I get a syntax error. Am I supposed to replace Original_Number_Column_Name with something specific, like a number and a column name?
Ok, (duh) my numeric column is Year, so I changed the formula to:
=TEXT([Year],”0″)
but I still get this when I hit OK:
“The formula contains a syntax error or is not supported.”
I’m using SharePoint 2007.
Matt – When you copied the following text ‘=TEXT([Year],”0″)’ the double quotes were formated to a different symbol that is why you are getting syntax error.
Try this : =TEXT([Year],”0″)
This seems like a pointless workaround. I have a list of building numbers that I’d like to be able to sort as if they were a number (1,2,10, etc.) instead of as a text field (1, 10, 2, etc.) but I don’t want a comma in it. This effectively converts the number column into a text field causing it to be sorted as such (even if I choose number as the type of calculated field). This seems pointless because you can just make the type of column a text field anyway. If there is a way to preserve the sorting and remove the commas that’d be very useful.
Steven – I faced the same issue – but able to figure out using SharePoint designer – Find my steps below:
1. I did the above work around to remove commas from a number column
2. Opened the sharepoint list page in SharePoint Designer and converted the list into XSLT Data View
3. Click the column which you want to sort in designer (split mode) which will directly take you to the xsl code delaration of column properties as shown below, Minutes is the column which I enabled with above workaround and enabled sorting by changing the fieldtype from x:string to x:int.
@Minutes Minutes
Minutes
1
x:int
This works for me.
Steven – I faced the same issue – but able to figure out using SharePoint designer – Find my steps below:
1. I did the above work around to remove commas from a number column
2. Opened the sharepoint list page in SharePoint Designer and converted the list into XSLT Data View
3. Click the column which you want to sort in designer (split mode) which will directly take you to the xsl code delaration of column properties as shown below, Minutes is the column which I enabled with above workaround and enabled sorting by changing the fieldtype from x:string to x:int.
xsl:with-param name=”fieldname” @Minutes /xsl:with-param
xsl:with-param name=”fieldtitle” Minutes /xsl:with-param
xsl:with-param name=”displayname” Minutes /xsl:with-param
xsl:with-param name=”sortable” 1 /xsl:with-param
xsl:with-param name=”fieldtype” x:int /xsl:with-param
This works for me.
That didn’t work either. The view now has problems grouping things and still sorts it as a string.