VBA for pivot table

isacp

Board Regular
Joined
Dec 16, 2004
Messages
135
can you please help me with setting up a pivot table by code
very simple
column b & c go in coulmn fields
column d-h go in row fields
c is position 1
d is position 2
d-h is summed and in order
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,318
Office Version
  1. 365
Platform
  1. Windows
isacp

Why not start by recording a macro when you create the pivot table with those specifications?

This should generate code that can be adapted as needed.

BTW what are you actually trying to do?
 

isacp

Board Regular
Joined
Dec 16, 2004
Messages
135
i get a e mail of sales figures
the sales comes in three columns one is phone sales one is mail and the other is store
i get these in the rows
column a = names
b= order type(phone, mail,store)
c-h is numbers
each persons name is written three times
i need to combine 2 of them
but it depends if hes a store guy then i combine mail and store
if hes phone then mail and phone
so i put it into a pivot while recording(i did that yesterday)
and after working for a while and finished everything i tried it again and now it wont make a pivot table some error comes up
 

Forum statistics

Threads
1,147,690
Messages
5,742,653
Members
423,746
Latest member
Joaogomes

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
Top