Get Pivot Table Data - without building one

30percent

Board Regular
Joined
May 5, 2011
Messages
123
Office Version
  1. 2016
Platform
  1. Windows
Hi,

say I have the following table:

[TABLE="width: 239"]
<tbody>[TR]
[TD]Date[/TD]
[TD]Customer[/TD]
[TD]Orders[/TD]
[/TR]
[TR]
[TD]2-Jan[/TD]
[TD]Jennifer[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]15-Jan[/TD]
[TD]Robert[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]16-Jan[/TD]
[TD]Sam[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]17-Jan[/TD]
[TD]Hassan[/TD]
[TD]6[/TD]
[/TR]
[TR]
[TD]18-Jan[/TD]
[TD]Jennifer[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]19-Jan[/TD]
[TD]Robert[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]22-Jan[/TD]
[TD]Sam[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]24-Jan[/TD]
[TD]Hassan[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]25-Jan[/TD]
[TD]Hassan[/TD]
[TD]4[/TD]
[/TR]
</tbody>[/TABLE]

It is possible to get Pivot Table data WITH VBA WITHOUT:

1) actually first creating a Pivot Table?

"OR"

2) create the Pivot Table in the background and just obtain the data without first having to build it on a worksheet?

Example:

[TABLE="width: 188"]
<tbody>[TR]
[TD]Row Labels[/TD]
[TD]Sum of Orders[/TD]
[/TR]
[TR]
[TD]Hassan[/TD]
[TD="align: right"]12[/TD]
[/TR]
[TR]
[TD]Jennifer[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD]Robert[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD]Sam[/TD]
[TD="align: right"]11[/TD]
[/TR]
[TR]
[TD]Grand Total[/TD]
[TD="align: right"]33[/TD]
[/TR]
</tbody>[/TABLE]


Say, I want the sum total orders for Sam.

Thank you!
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
You can write sumif formulas in the worksheet or vba. Same for the subtotaler.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,322
Members
452,635
Latest member
laura12345

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