ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel pivot fields and trailing spaces (https://www.excelbanter.com/excel-programming/332081-excel-pivot-fields-trailing-spaces.html)

Fred

Excel pivot fields and trailing spaces
 
It appears to me that Excel pivot tables do not act per ANSI 92 in string
comparisons. My environment is MSO 2000 Excel, English(UK).
If I create a data table:
col1 col2
1 "abc"
2 "abc "
3 "abc "

and create a database query to a sheet based on this table, then filter the
data, the three strings in col2 are equal per ANSI 92 and appear as one item
in the filter drop down box.
If you create a pivot table based on the same data table, the field based
on col2 lists abc as three separate values, ie the spaces are significant.
Am I missing an application/operating system configuration that controls
this?


--
Fred

Debra Dalgleish

Excel pivot fields and trailing spaces
 
There's no setting you can change that will make these items equivalent
in a pivot table.

You could add another column to the source table, and use the TRIM
function to remove the extra spaces. Then, use that field in the pivot
table.

Fred wrote:
It appears to me that Excel pivot tables do not act per ANSI 92 in string
comparisons. My environment is MSO 2000 Excel, English(UK).
If I create a data table:
col1 col2
1 "abc"
2 "abc "
3 "abc "

and create a database query to a sheet based on this table, then filter the
data, the three strings in col2 are equal per ANSI 92 and appear as one item
in the filter drop down box.
If you create a pivot table based on the same data table, the field based
on col2 lists abc as three separate values, ie the spaces are significant.
Am I missing an application/operating system configuration that controls
this?




--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html



All times are GMT +1. The time now is 05:11 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com