how to reference selected cells in SourceData

  • Thread starter Thread starter ed
  • Start date Start date
E

ed

How do I change the code at the bottom to reference all the selected
cells in the source table/ The number of cells changes every time.

In other words what syntax replaces R1C6:R392C8? to reference the
selected cells whatever they may be?

I am obviously not at all proficient in this endeavor. Thanks

=========================================================
ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatabase, SourceData:= _
"rents!R1C6:R392C8")
=========================================================
 

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