macro to select year in Filter omn Pivot table

howard

Well-known Member
Joined
Jun 26, 2006
Messages
5,371
I have a pivot Table on sheet "summary"


Where the value in C10 in sheet "Data" is zero, the year to be selected on Pivot filter in B2 must be blank , otherwise select highest year


It would be appreciated if some could provide me with code to do this


<b></b><table cellpadding="2.5px" rules="all" style=";background-color: rgb(255,255,255);border: 1px solid;border-collapse: collapse; border-color: rgb(187,187,187)"><colgroup><col width="25px" style="background-color: rgb(218,231,245)" /><col /><col /></colgroup><thead><tr style=" background-color: rgb(218,231,245);text-align: center;color: rgb(22,17,32)"><th></th><th>A</th><th>B</th></tr></thead><tbody><tr ><td style="color: rgb(22,17,32);text-align: center;">1</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">2</td><td style=";">Financial Year</td><td style=";">2020</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">3</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">4</td><td style=";">Row Labels</td><td style=";">Sum of Capital Cost</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">5</td><td style=";">Furniture and Fittings</td><td style="text-align: right;;">5500</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">6</td><td style=";">Computers</td><td style="text-align: right;;">25600</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">7</td><td style=";">Grand Total</td><td style="text-align: right;;">31100</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">8</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">9</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">10</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">11</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">12</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">13</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">14</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">15</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr></tbody></table><p style="width:4.8em;font-weight:bold;margin:0;padding:0.2em 0.6em 0.2em 0.5em;border: 1px solid rgb(187,187,187);border-top:none;text-align: center;background-color: rgb(218,231,245);color: rgb(22,17,32)">Sheet1</p><br /><br />
 

howard

Well-known Member
Joined
Jun 26, 2006
Messages
5,371
Duplicated post in error. After submitting post, I tried to find post but could not so reposted. My apologies, but thought that there may have been a problem on the system
 

Forum statistics

Threads
1,077,674
Messages
5,335,606
Members
399,028
Latest member
greyland

Some videos you may like

This Week's Hot Topics

Top