Pivot tables changes the case

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
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 said:
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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top