vba code

prashanthdivya

Board Regular
Joined
Aug 23, 2011
Messages
75
Hi

Can any one help me with a VBA Code which would ask me to select a value between N or S. If I select "N" then the pivot field items "Guj","Del","Mum" should get selected.
If i select "S" then the pivot field items "Bng","Kar","KER" and "TIR" should get selected.

Thanks
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Hi again prashanthdivya,

You can use the InputBox Function to request the response from the user.
(See Excel VBA help for syntax).

Depending on the user's response, you can filter a specified PT field to show items the items in your specfied list using the Filter_PivotField function code shown in this thread (post #8)
http://www.mrexcel.com/forum/showthread.php?t=589795

This should get you started in the right direction. If you get stuck,
just post the code that you are trying and explain what isn't working.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,830
Messages
6,121,839
Members
449,051
Latest member
excelquestion515

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