Home |
Search |
Today's Posts |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
When you put quotes around things, it's just text, not a variable. Instead
of SourceData:="!MyData" try SourceData:=MyData I'm walking you through this project and you ask me to be nice ? Next week I'll be nice. Best wishes Harald "nbaj2k" skrev i melding ... I'm just learning this so be nice lol This is not vaild code? I tried to implement MyData, but wanted the Pivot Table to include the current region of cell D3. I wanted to do this because there may be a lot of records, and might not be. It gives me an error saying "Reference not valid" so I assume I'm writing this wrong. Thanks, ~J Dim MyData As Range Set MyData = Sheets("Visible").Range("D3").CurrentRegion Range("D3").Select ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatab ase, SourceData:= _ "!MyData").CreatePivotTable TableDestination:="", TableName:= _ "PivotTable1", DefaultVersion:=xlPivotTableVersion10 ActiveSheet.PivotTableWizard TableDestination:=ActiveSheet.Cells(3, 1) ActiveSheet.Cells(3, 1).Select ActiveSheet.PivotTables("PivotTable1").AddFields RowFields:="created" ActiveSheet.PivotTables("PivotTable1").PivotFields ("created").Orientation = _ xlDataField Range("A4").Select Selection.Group Start:=True, End:=True, Periods:=Array(False, False, True, _ False, False, False, False) -- nbaj2k ------------------------------------------------------------------------ nbaj2k's Profile: http://www.excelforum.com/member.php...o&userid=36480 View this thread: http://www.excelforum.com/showthread...hreadid=562821 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
help needed with excel, need to count the number ofpeople here each hour. | Excel Worksheet Functions | |||
How to use count for calls per hour | New Users to Excel | |||
Hour Count | Excel Worksheet Functions | |||
How to count hours- and multiply with my wage per hour... | Excel Discussion (Misc queries) | |||
Count by date and hour | Excel Worksheet Functions |