LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,119
Default Pivot Table Question

The easiest way to do something like that is to have the two text boxes
populate two cells on on your spreadsheet somewhere. Add a column to your
spreadsheet called included dates (or something like that) and then have a
formula in this column that returns a true (if the date is between the two
dates) or false based on the two dates. Include this field at the top of the
pivot table and then just refresh it. The solution seems a little Mickey
Mouse but it is easy and it works quite well.
--
HTH...

Jim Thomlinson


"dok112" wrote:


I think this might be better suited to be posted here instead of the
charting forum.

--------------------------------------------------------------------------------

I have a userform, and it has 2 textboxes, is there a way that I can
write a macro that will only display that data on a pivot table between
the 2 dates entered in these textboxes?

Right now I have the below, but I don't want to have to have all the
dates written like this.

With thisworkbook.sheets("CARS Survey Results by
Date").PivotTables("PivotTable2").PivotFields("Dat e")
.PivotItems("9/28/2005").Visible = True
.PivotItems("9/29/2005").Visible = True
.PivotItems("9/30/2005").Visible = True
End With

I would like to enter "9/28/2005" in textbox1 & "9/30/2005" in textbox
2 and have it display only these results.

Any help will be greatly appreciated.


--
dok112
------------------------------------------------------------------------
dok112's Profile: http://www.excelforum.com/member.php...o&userid=10581
View this thread: http://www.excelforum.com/showthread...hreadid=478854


 
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 Question Connie Martin Excel Discussion (Misc queries) 0 May 7th 08 02:20 PM
Pivot Table question Stevek Excel Worksheet Functions 2 March 4th 06 05:17 AM
Pivot Table Question MarkM Excel Discussion (Misc queries) 3 February 1st 06 09:53 PM
Pivot Table Question : If statment in Pivot Table?? seve Excel Discussion (Misc queries) 2 November 22nd 05 01:00 AM
Pivot Table Question [email protected] Excel Programming 1 December 16th 03 09:11 AM


All times are GMT +1. The time now is 07:41 AM.

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"