use web service inside Pivot table calculated measure

dadarara

New Member
Joined
Dec 19, 2015
Messages
1
I have a data table with Stock trades.
I also have a pivot that shows all currently open stock positions.

I would like to have a calculated field in the pivot that will retrieve the current stock quote from Yahoo and calculate the current value of a position.
I know how to get the stock quotes into excel. I need the data populated in my above pivot table automatically.
I was thinking about creating a "pivot measure" that will include a web service.

Can I do that? or can I call an external VBA function from within the measure ?

a side note: I have the pivot with the open positions working. I have defined the excel cells next to the pivot with the web service formula.
but whenever the pivot is updated (after refresh) the cells next tot he pivot are not updated and keep the old data.
nothing I do resolves the issue.

Thanks for help
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Hi

You say that the cells external to your PT are producing the required result, but just not updating.
Any cells outside of the Pivot Table will not refresh as part of any update of the Pivot Cache.
Perhaps you could use the Pivot Update event to refresh your external cells

Code:
Private Sub Worksheet_PivotTableUpdate(ByVal Target As PivotTable)
' your code to refresh your range of cells


End Sub
 
Upvote 0

Forum statistics

Threads
1,224,144
Messages
6,176,648
Members
452,739
Latest member
SCEducator

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