Hi everybody,
I am trying to use the [.autoshow][1] method in a pivot table but I get a "1004" error message every time. I am trying to us it under Excel 2011 for mac. I am not sure if this method works on my version of Excel, could somebody help?
Here is the procedure I have been working on
ActiveSheet.PivotTables(1).PivotFields("City").AutoShow Top:=xlAutomatic, Range:=xlTop, _
Count:=6, Field:="Digital channel"
The source table looks like this (I shortened it, it actually has 91 rows)
+-----------------+-----------------+------------+
| City | Digital channel | Callsign |
+-----------------+-----------------+------------+
| Baie-Saint-Paul | 13,00 | CIMT-DT-4 |
| Baie-Saint-Paul | 26,00 | CFTF-DT-10 |
| Baie-Saint-Paul | 36,00 | CKRT-DT-1 |
| Baie-Comeau | 9,00 | CFTF-DT-5 |
| Baie-Trinité | 12,00 | CIVF-DT |
| Cabano | 12,00 | CFTF-DT-3 |
| Cabano | 21,00 | CKRT-DT-4 |
| Cabano | 23,00 | CIMT-DT-8 |
| Carleton | 44,00 | CFTF-DT-11 |
| Carleton | 5,00 | CHAU-DT |
| Carleton | 15,00 | CIVK-DT |
| Chandler | 26,00 | CHAU-DT-4 |
| Chapeau | 23,00 | CIVP-DT |
| Chicoutimi | 46,00 | CJPM-DT |
| Cloridorme | 11,00 | CHAU-DT-8 |
| Dégelis | 25,00 | CKRT-DT-2 |
| Forestville | 4,00 | CFTF-DT-4 |
+-----------------+-----------------+------------+
And the pivot table looks like this
+-------------------+-----------------+
| City | Digital channel |
+-------------------+-----------------+
| Baie-Comeau | 9 |
| Baie-Saint-Paul | 75 |
| Baie-Trinité | 12 |
| Cabano | 56 |
| Carleton | 64 |
| Chandler | 26 |
| Chapeau | 23 |
| Chicoutimi | 46 |
| Cloridorme | 11 |
| Dégelis | 25 |
| Forestville | 4 |
| Gascons | 32 |
| Gaspé | 71 |
| Gatineau | 104 |
| Grand-Fonds | 31 |
| L'Anse-a-Valleau, | 12 |
| Les Escoumins | 68 |
| Montreal | 263 |
| Parent | 0 |
| Percé | 53 |
| Port-Daniel | 10 |
| Quebec City | 113 |
| Radisson | 0 |
| Rimouski | 105 |
| Rivière-au-Renard | 4 |
| Rivière-du-Loup | 110 |
| Roberval | 0 |
| Rouyn-Noranda | 50 |
| Saguenay | 79 |
+-------------------+-----------------+
Thank you!
Bookmarks