View Single Post
 
Old 06-15-2016, 08:45 AM
andylaw31 andylaw31 is offline Windows 7 32bit Office 2010 32bit
Novice
 
Join Date: Aug 2015
Posts: 2
andylaw31 is on a distinguished road
Question Macro recorder changing reference style for columns in pivot source

So if I record a macro selecting rows A:H as the source for a pivot table, in the VBA Excel will refer to these columns as "C1:C8", presumably meaning column one to column eight. If I selected columns C:J, it would translate into the VBA as "C3:C10".

This isn't A1 or R1C1 referencing style, so what is it, and why is Excel being so silly? The ramification of referring to cells like this is that it overlaps with A1 style, so Excel would presumably read the VBA as referring to cells C1:C8, rather than columns 1:8/A:H.

It's easy enough to change this in the VBA, but I'm just confused as to why it's doing this and if there is a solution.

Andy
Reply With Quote