Problem setting PivotCache.DataSource as a range

Mike Blackman

Well-known Member
Joined
Jun 8, 2007
Messages
2,494
Hi All,

What I'm trying to do is check to see if two pivot cache's data source interesect. Using the pivot cache's .SourceData its coming through as "Data!R16C8:R242C11" and I'm having real problems/brain freeze trying to convert this into a range object... can anyone shed any light on this for me?
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
One way, assuming pc1 and pc2 as your cache objects:
Code:
    Set rng1 = Range(Application.ConvertFormula(pc1.SourceData, xlR1C1, xlA1))
    Set rng2 = Range(Application.ConvertFormula(pc2.SourceData, xlR1C1, xlA1))
    If Not Intersect(rng1, rng2) Is Nothing then
 ' do whatever
 
Upvote 0

Forum statistics

Threads
1,224,532
Messages
6,179,388
Members
452,908
Latest member
MTDelphis

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top