ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Pivot tables changes the case (https://www.excelbanter.com/excel-programming/301361-pivot-tables-changes-case.html)

Katherine

Pivot tables changes the case
 
Hi, I have a macro that creates a pivot table from a set of data on a separate sheet in Excel. My problem is that during the pivot the case on the header _sometimes_ gets changed. For example the data is 'EX-Examination' but in the pivot table this is shown as 'EX-examination' .

This then means that my later macros can't then match up the 2 pieces of data. Any ideas how to stop this happening?

Bob Flanagan

Pivot tables changes the case
 
Katherine, most likely the first occurence of the phase is the non-capital
occurence.

The simpliest solution is to put

Option Compare Text

at the top of your modules. This makes string comparisions case
insensitive.

Bob Flanagan
Macro Systems
http://www.add-ins.com
Productivity add-ins and downloadable books on VB macros for Excel

"Katherine" wrote in message
...
Hi, I have a macro that creates a pivot table from a set of data on a

separate sheet in Excel. My problem is that during the pivot the case on the
header _sometimes_ gets changed. For example the data is 'EX-Examination'
but in the pivot table this is shown as 'EX-examination' .

This then means that my later macros can't then match up the 2 pieces of

data. Any ideas how to stop this happening?




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

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