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
 

Some videos you may like

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.

Jerry Sullivan

MrExcel MVP
Joined
Mar 18, 2010
Messages
8,787
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:

prashanthdivya

Board Regular
Joined
Aug 23, 2011
Messages
75
Hey Jerry,

Thanks for your response. I would give it a shot . Any help needed will get back to you
 

Watch MrExcel Video

Forum statistics

Threads
1,127,531
Messages
5,625,366
Members
416,096
Latest member
forevans

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