Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22
Default Formulas based on Pivot Table

I believe this is possible but I can't remember how I did it in the past...

I have a pivot table that has formulas to the right and depending on the
filter I use I can have anywhere from 5 rows of data to 30,000 rows. How can
I have the formulas only appear where there is data? So if I have 5 records I
would have 5 rows of formulas and if I have 30,000 records I would have
30,000 rows of formulas.

Is this possible?
--
Thank You,
Steve
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,979
Default Formulas based on Pivot Table

You could use the IF function with your current formula. For example:

=IF(F6="","",F6*12)

Steve D wrote:
I believe this is possible but I can't remember how I did it in the past...

I have a pivot table that has formulas to the right and depending on the
filter I use I can have anywhere from 5 rows of data to 30,000 rows. How can
I have the formulas only appear where there is data? So if I have 5 records I
would have 5 rows of formulas and if I have 30,000 records I would have
30,000 rows of formulas.

Is this possible?



--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22
Default Formulas based on Pivot Table

Thank You, but that does not solve my problem. Actually 2 problems, the first
being that I still will have all of the formulas in the file, causing the
file size to be unnecessarily large and the other issue being if my data
changes I do not know how many rows of formulas I actually need.

Any other thoughts?

--
Thank You,
Steve


"Debra Dalgleish" wrote:

You could use the IF function with your current formula. For example:

=IF(F6="","",F6*12)

Steve D wrote:
I believe this is possible but I can't remember how I did it in the past...

I have a pivot table that has formulas to the right and depending on the
filter I use I can have anywhere from 5 rows of data to 30,000 rows. How can
I have the formulas only appear where there is data? So if I have 5 records I
would have 5 rows of formulas and if I have 30,000 records I would have
30,000 rows of formulas.

Is this possible?



--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,979
Default Formulas based on Pivot Table

To add the formula to only the rows adjacent to the pivot table, you
could use event programming. For example, on the code sheet for the
worksheet that contains the pivot table:

Private Sub Worksheet_PivotTableUpdate(ByVal Target As PivotTable)
Dim lRow As Long
Dim pt As PivotTable
Set pt = Target

With pt.TableRange2
lRow = .Rows(.Rows.Count).Row
End With

With ActiveSheet
.Columns(6).ClearContents
.Range(.Cells(8, 6), .Cells(lRow, 6)).FormulaR1C1 _
= "=RC[-2]*0.05+10"
End With

End Sub


Steve D wrote:
Thank You, but that does not solve my problem. Actually 2 problems, the first
being that I still will have all of the formulas in the file, causing the
file size to be unnecessarily large and the other issue being if my data
changes I do not know how many rows of formulas I actually need.

Any other thoughts?



--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html

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 formulas based on text fields Kay Excel Worksheet Functions 3 December 28th 07 08:57 PM
2nd and third pivot table based on first/main one orrko Excel Discussion (Misc queries) 0 February 10th 07 01:03 AM
Pivot table based on a .cub file? dblat Excel Discussion (Misc queries) 0 June 30th 06 04:06 PM
Filter based on Pivot table michaelp Excel Worksheet Functions 3 December 7th 05 12:48 AM
Pivot Chart based on a pivot table changes dineshnewcomer Charts and Charting in Excel 1 April 15th 05 03:52 AM


All times are GMT +1. The time now is 12:42 PM.

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

About Us

"It's about Microsoft Excel"