Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
nrehman
 
Posts: n/a
Default Pivot Table Cycling Through Page Fields Automatically

Hi. I am trying to cycle through a complete set of data in one of the
parameters in the "Page" field. For example, there are 500 investments, and I
want to compute the internal rate of return (IRR) for each investment based
on a series of cashflows for each investment.

The IRR is a function that is placed outside the pivot table. As each
investment number is chosen, the underlying pivot table cashflow data
changes, allow the IRR function to pick up these cashflows and compute the
IRR. However, if there are 500 investments, this becomes very time consuming
- especially if the underlying cashflow change constantly.

How could I cycle through the investments and copy the results from the IRR
to a separate table? (I can create the copy routine, but have not been
successful with the cycling through the pivot table page field).

Many thanks!

  #2   Report Post  
Debra Dalgleish
 
Posts: n/a
Default

There's sample code here for printing each item in the page field:

http://www.contextures.com/xlPivot09.html

You could adapt that to your workbook.

nrehman wrote:
Hi. I am trying to cycle through a complete set of data in one of the
parameters in the "Page" field. For example, there are 500 investments, and I
want to compute the internal rate of return (IRR) for each investment based
on a series of cashflows for each investment.

The IRR is a function that is placed outside the pivot table. As each
investment number is chosen, the underlying pivot table cashflow data
changes, allow the IRR function to pick up these cashflows and compute the
IRR. However, if there are 500 investments, this becomes very time consuming
- especially if the underlying cashflow change constantly.

How could I cycle through the investments and copy the results from the IRR
to a separate table? (I can create the copy routine, but have not been
successful with the cycling through the pivot table page field).

Many thanks!



--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html

  #3   Report Post  
nrehman
 
Posts: n/a
Default

Thank you! I should be able to adapt this code.

"Debra Dalgleish" wrote:

There's sample code here for printing each item in the page field:

http://www.contextures.com/xlPivot09.html

You could adapt that to your workbook.

nrehman wrote:
Hi. I am trying to cycle through a complete set of data in one of the
parameters in the "Page" field. For example, there are 500 investments, and I
want to compute the internal rate of return (IRR) for each investment based
on a series of cashflows for each investment.

The IRR is a function that is placed outside the pivot table. As each
investment number is chosen, the underlying pivot table cashflow data
changes, allow the IRR function to pick up these cashflows and compute the
IRR. However, if there are 500 investments, this becomes very time consuming
- especially if the underlying cashflow change constantly.

How could I cycle through the investments and copy the results from the IRR
to a separate table? (I can create the copy routine, but have not been
successful with the cycling through the pivot table page field).

Many thanks!



--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html


  #4   Report Post  
nrehman
 
Posts: n/a
Default

This worked great! Thank you.

However, as my sample has now expanded beyond a couple of hundred pivot
items. There are now over two thousand unique items and I am faced with the
error that effectively says there are too many items for the pivotitems
field. (I believe this is a function of the number of unique items by the
columns adding up to some number which cannot be exceeded).

Is there a work around? I would like to be able to generate the results for
all the items at one shot as it speeds the work and precludes human error.

Many thanks.



"Debra Dalgleish" wrote:

There's sample code here for printing each item in the page field:

http://www.contextures.com/xlPivot09.html

You could adapt that to your workbook.

nrehman wrote:
Hi. I am trying to cycle through a complete set of data in one of the
parameters in the "Page" field. For example, there are 500 investments, and I
want to compute the internal rate of return (IRR) for each investment based
on a series of cashflows for each investment.

The IRR is a function that is placed outside the pivot table. As each
investment number is chosen, the underlying pivot table cashflow data
changes, allow the IRR function to pick up these cashflows and compute the
IRR. However, if there are 500 investments, this becomes very time consuming
- especially if the underlying cashflow change constantly.

How could I cycle through the investments and copy the results from the IRR
to a separate table? (I can create the copy routine, but have not been
successful with the cycling through the pivot table page field).

Many thanks!



--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html


  #5   Report Post  
Debra Dalgleish
 
Posts: n/a
Default

The page field should allow more than 2000 items. What version of Excel
are you using?


nrehman wrote:
This worked great! Thank you.

However, as my sample has now expanded beyond a couple of hundred pivot
items. There are now over two thousand unique items and I am faced with the
error that effectively says there are too many items for the pivotitems
field. (I believe this is a function of the number of unique items by the
columns adding up to some number which cannot be exceeded).

Is there a work around? I would like to be able to generate the results for
all the items at one shot as it speeds the work and precludes human error.

Many thanks.



"Debra Dalgleish" wrote:


There's sample code here for printing each item in the page field:

http://www.contextures.com/xlPivot09.html

You could adapt that to your workbook.

nrehman wrote:

Hi. I am trying to cycle through a complete set of data in one of the
parameters in the "Page" field. For example, there are 500 investments, and I
want to compute the internal rate of return (IRR) for each investment based
on a series of cashflows for each investment.

The IRR is a function that is placed outside the pivot table. As each
investment number is chosen, the underlying pivot table cashflow data
changes, allow the IRR function to pick up these cashflows and compute the
IRR. However, if there are 500 investments, this becomes very time consuming
- especially if the underlying cashflow change constantly.

How could I cycle through the investments and copy the results from the IRR
to a separate table? (I can create the copy routine, but have not been
successful with the cycling through the pivot table page field).

Many thanks!



--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html





--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html



  #6   Report Post  
nrehman
 
Posts: n/a
Default

Thank you for your reply.

You are absolutely correct. Creating the identical parameters to cause the
same "bug", I found that I had created another variable which was crashing
the code. Once I removed that, the program ran fine (which is really great)!

I will be coming down to another wall soon, which the the maximum number of
rows (I have almost 65000 rows by 6 columns of data). Would you have any
ideas for how to work around this issue? Is there some way in the vb to
code/join two worksheets or range two sets of columns for a pivot table? (If
you prefer, I can submit a new item for the forum).

Thanks again for your invaluable help.

Nadir


"Debra Dalgleish" wrote:

The page field should allow more than 2000 items. What version of Excel
are you using?


nrehman wrote:
This worked great! Thank you.

However, as my sample has now expanded beyond a couple of hundred pivot
items. There are now over two thousand unique items and I am faced with the
error that effectively says there are too many items for the pivotitems
field. (I believe this is a function of the number of unique items by the
columns adding up to some number which cannot be exceeded).

Is there a work around? I would like to be able to generate the results for
all the items at one shot as it speeds the work and precludes human error.

Many thanks.



"Debra Dalgleish" wrote:


There's sample code here for printing each item in the page field:

http://www.contextures.com/xlPivot09.html

You could adapt that to your workbook.

nrehman wrote:

Hi. I am trying to cycle through a complete set of data in one of the
parameters in the "Page" field. For example, there are 500 investments, and I
want to compute the internal rate of return (IRR) for each investment based
on a series of cashflows for each investment.

The IRR is a function that is placed outside the pivot table. As each
investment number is chosen, the underlying pivot table cashflow data
changes, allow the IRR function to pick up these cashflows and compute the
IRR. However, if there are 500 investments, this becomes very time consuming
- especially if the underlying cashflow change constantly.

How could I cycle through the investments and copy the results from the IRR
to a separate table? (I can create the copy routine, but have not been
successful with the cycling through the pivot table page field).

Many thanks!



--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html





--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html


  #7   Report Post  
Debra Dalgleish
 
Posts: n/a
Default

You could use multiple consolidation ranges, but the results are too
good. There's an example, and a couple of workarounds, he

http://www.contextures.com/xlPivot08.html


nrehman wrote:
Thank you for your reply.

You are absolutely correct. Creating the identical parameters to cause the
same "bug", I found that I had created another variable which was crashing
the code. Once I removed that, the program ran fine (which is really great)!

I will be coming down to another wall soon, which the the maximum number of
rows (I have almost 65000 rows by 6 columns of data). Would you have any
ideas for how to work around this issue? Is there some way in the vb to
code/join two worksheets or range two sets of columns for a pivot table? (If
you prefer, I can submit a new item for the forum).

Thanks again for your invaluable help.

Nadir


"Debra Dalgleish" wrote:


The page field should allow more than 2000 items. What version of Excel
are you using?


nrehman wrote:

This worked great! Thank you.

However, as my sample has now expanded beyond a couple of hundred pivot
items. There are now over two thousand unique items and I am faced with the
error that effectively says there are too many items for the pivotitems
field. (I believe this is a function of the number of unique items by the
columns adding up to some number which cannot be exceeded).

Is there a work around? I would like to be able to generate the results for
all the items at one shot as it speeds the work and precludes human error.

Many thanks.



"Debra Dalgleish" wrote:



There's sample code here for printing each item in the page field:

http://www.contextures.com/xlPivot09.html

You could adapt that to your workbook.

nrehman wrote:


Hi. I am trying to cycle through a complete set of data in one of the
parameters in the "Page" field. For example, there are 500 investments, and I
want to compute the internal rate of return (IRR) for each investment based
on a series of cashflows for each investment.

The IRR is a function that is placed outside the pivot table. As each
investment number is chosen, the underlying pivot table cashflow data
changes, allow the IRR function to pick up these cashflows and compute the
IRR. However, if there are 500 investments, this becomes very time consuming
- especially if the underlying cashflow change constantly.

How could I cycle through the investments and copy the results from the IRR
to a separate table? (I can create the copy routine, but have not been
successful with the cycling through the pivot table page field).

Many thanks!



--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html




--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html





--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html

  #8   Report Post  
Dave Peterson
 
Posts: n/a
Default

Debra Dalgleish has some sample code at:
http://contextures.com/xlPivot09.html

I bet you could modify it to do what you want.

nrehman wrote:

Hi. I am trying to cycle through a complete set of data in one of the
parameters in the "Page" field. For example, there are 500 investments, and I
want to compute the internal rate of return (IRR) for each investment based
on a series of cashflows for each investment.

The IRR is a function that is placed outside the pivot table. As each
investment number is chosen, the underlying pivot table cashflow data
changes, allow the IRR function to pick up these cashflows and compute the
IRR. However, if there are 500 investments, this becomes very time consuming
- especially if the underlying cashflow change constantly.

How could I cycle through the investments and copy the results from the IRR
to a separate table? (I can create the copy routine, but have not been
successful with the cycling through the pivot table page field).

Many thanks!


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pivot table page field switch to (all) if my criteria is not avail Angus Excel Discussion (Misc queries) 0 July 30th 05 05:06 AM
Pivot Table page fields Chad W. Excel Discussion (Misc queries) 1 July 27th 05 04:27 PM
How to remove Drop Page Fields Here from Pivot Table wengyee Excel Discussion (Misc queries) 2 June 3rd 05 10:36 PM
How do I set up filter for page fields in pivot table? Mitsycat Excel Discussion (Misc queries) 3 May 6th 05 10:27 PM
Pivot Table Page Fields Andy Excel Discussion (Misc queries) 1 December 17th 04 05:25 PM


All times are GMT +1. The time now is 04:42 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"