Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
I have a cell that includes a list of names (data validation).
I want the pivot table page field to change following the name selected. How can I do this? Is it better with a combo box? Thank you! |
#2
![]() |
|||
|
|||
![]()
I would think it would be easiest if you made the name column a page field in
the pivottable. It'll even look kind of like data|validation. FA wrote: I have a cell that includes a list of names (data validation). I want the pivot table page field to change following the name selected. How can I do this? Is it better with a combo box? Thank you! -- Dave Peterson |
#3
![]() |
|||
|
|||
![]()
Hello, I need to explian better.
Name is included in the page field. But it has too many names. The data validation in another page includes selected names. The purpose is to make easier for users to select the names that they need. The data is shown for the selected name in graphical form. I have all that set. I want users to select a name and be able to see the data for that name. It is a lot of data so it would be better if with the selection of the names in one page changes the name field in the pivot table. How can I do that? Is it possible? Thank you! "Dave Peterson" wrote: I would think it would be easiest if you made the name column a page field in the pivottable. It'll even look kind of like data|validation. FA wrote: I have a cell that includes a list of names (data validation). I want the pivot table page field to change following the name selected. How can I do this? Is it better with a combo box? Thank you! -- Dave Peterson |
#4
![]() |
|||
|
|||
![]()
This seemed to work under light testing...
Right click on the worksheet tab that holds the data|validation cell. Select view code and paste this into the code window: Option Explicit Private Sub Worksheet_Change(ByVal Target As Range) If Target.Cells.Count 1 Then Exit Sub If Intersect(Target, Me.Range("E1")) Is Nothing Then Exit Sub Application.EnableEvents = False Worksheets("sheet2").PivotTables("Pivottable1") _ .PageFields("Name").CurrentPage = Target.Value Application.EnableEvents = True End Sub You'll have to modify the worksheet name that holds the pivottable, the name of the pivottable, the name of the page field, the address of the cell with the data|validation. I used Sheet2, Pivottable1, Name, and E1. FA wrote: Hello, I need to explian better. Name is included in the page field. But it has too many names. The data validation in another page includes selected names. The purpose is to make easier for users to select the names that they need. The data is shown for the selected name in graphical form. I have all that set. I want users to select a name and be able to see the data for that name. It is a lot of data so it would be better if with the selection of the names in one page changes the name field in the pivot table. How can I do that? Is it possible? Thank you! "Dave Peterson" wrote: I would think it would be easiest if you made the name column a page field in the pivottable. It'll even look kind of like data|validation. FA wrote: I have a cell that includes a list of names (data validation). I want the pivot table page field to change following the name selected. How can I do this? Is it better with a combo box? Thank you! -- Dave Peterson -- Dave Peterson |
#5
![]() |
|||
|
|||
![]()
This forum is of great help!!!!!!!!!!!!!!!!!!!!!
Thank you very much. "Dave Peterson" wrote: This seemed to work under light testing... Right click on the worksheet tab that holds the data|validation cell. Select view code and paste this into the code window: Option Explicit Private Sub Worksheet_Change(ByVal Target As Range) If Target.Cells.Count 1 Then Exit Sub If Intersect(Target, Me.Range("E1")) Is Nothing Then Exit Sub Application.EnableEvents = False Worksheets("sheet2").PivotTables("Pivottable1") _ .PageFields("Name").CurrentPage = Target.Value Application.EnableEvents = True End Sub You'll have to modify the worksheet name that holds the pivottable, the name of the pivottable, the name of the page field, the address of the cell with the data|validation. I used Sheet2, Pivottable1, Name, and E1. FA wrote: Hello, I need to explian better. Name is included in the page field. But it has too many names. The data validation in another page includes selected names. The purpose is to make easier for users to select the names that they need. The data is shown for the selected name in graphical form. I have all that set. I want users to select a name and be able to see the data for that name. It is a lot of data so it would be better if with the selection of the names in one page changes the name field in the pivot table. How can I do that? Is it possible? Thank you! "Dave Peterson" wrote: I would think it would be easiest if you made the name column a page field in the pivottable. It'll even look kind of like data|validation. FA wrote: I have a cell that includes a list of names (data validation). I want the pivot table page field to change following the name selected. How can I do this? Is it better with a combo box? Thank you! -- Dave Peterson -- Dave Peterson |
#6
![]() |
|||
|
|||
![]()
Just in case...
If you are using xl97 and have that data|validation list on worksheet, you may find that this doesn't work. Debra Dalgleish explains the xl97 bug at: http://contextures.com/xlDataVal08.html#Change Her work around is to place a button next to the cell with Data|Validation and then click the button after choosing the name. FA wrote: This forum is of great help!!!!!!!!!!!!!!!!!!!!! Thank you very much. "Dave Peterson" wrote: This seemed to work under light testing... Right click on the worksheet tab that holds the data|validation cell. Select view code and paste this into the code window: Option Explicit Private Sub Worksheet_Change(ByVal Target As Range) If Target.Cells.Count 1 Then Exit Sub If Intersect(Target, Me.Range("E1")) Is Nothing Then Exit Sub Application.EnableEvents = False Worksheets("sheet2").PivotTables("Pivottable1") _ .PageFields("Name").CurrentPage = Target.Value Application.EnableEvents = True End Sub You'll have to modify the worksheet name that holds the pivottable, the name of the pivottable, the name of the page field, the address of the cell with the data|validation. I used Sheet2, Pivottable1, Name, and E1. FA wrote: Hello, I need to explian better. Name is included in the page field. But it has too many names. The data validation in another page includes selected names. The purpose is to make easier for users to select the names that they need. The data is shown for the selected name in graphical form. I have all that set. I want users to select a name and be able to see the data for that name. It is a lot of data so it would be better if with the selection of the names in one page changes the name field in the pivot table. How can I do that? Is it possible? Thank you! "Dave Peterson" wrote: I would think it would be easiest if you made the name column a page field in the pivottable. It'll even look kind of like data|validation. FA wrote: I have a cell that includes a list of names (data validation). I want the pivot table page field to change following the name selected. How can I do this? Is it better with a combo box? Thank you! -- Dave Peterson -- Dave Peterson -- Dave Peterson |
#7
![]() |
|||
|
|||
![]()
You see, that is the problem, after one success one becomes greedy:
Now I want the data validation field to adjust to the different lenghts that the list of names has. Any suggestions? "Dave Peterson" wrote: Just in case... If you are using xl97 and have that data|validation list on worksheet, you may find that this doesn't work. Debra Dalgleish explains the xl97 bug at: http://contextures.com/xlDataVal08.html#Change Her work around is to place a button next to the cell with Data|Validation and then click the button after choosing the name. FA wrote: This forum is of great help!!!!!!!!!!!!!!!!!!!!! Thank you very much. "Dave Peterson" wrote: This seemed to work under light testing... Right click on the worksheet tab that holds the data|validation cell. Select view code and paste this into the code window: Option Explicit Private Sub Worksheet_Change(ByVal Target As Range) If Target.Cells.Count 1 Then Exit Sub If Intersect(Target, Me.Range("E1")) Is Nothing Then Exit Sub Application.EnableEvents = False Worksheets("sheet2").PivotTables("Pivottable1") _ .PageFields("Name").CurrentPage = Target.Value Application.EnableEvents = True End Sub You'll have to modify the worksheet name that holds the pivottable, the name of the pivottable, the name of the page field, the address of the cell with the data|validation. I used Sheet2, Pivottable1, Name, and E1. FA wrote: Hello, I need to explian better. Name is included in the page field. But it has too many names. The data validation in another page includes selected names. The purpose is to make easier for users to select the names that they need. The data is shown for the selected name in graphical form. I have all that set. I want users to select a name and be able to see the data for that name. It is a lot of data so it would be better if with the selection of the names in one page changes the name field in the pivot table. How can I do that? Is it possible? Thank you! "Dave Peterson" wrote: I would think it would be easiest if you made the name column a page field in the pivottable. It'll even look kind of like data|validation. FA wrote: I have a cell that includes a list of names (data validation). I want the pivot table page field to change following the name selected. How can I do this? Is it better with a combo box? Thank you! -- Dave Peterson -- Dave Peterson -- Dave Peterson |
#8
![]() |
|||
|
|||
![]()
One more thing: The list of names excluding Grand Total...
"Dave Peterson" wrote: Just in case... If you are using xl97 and have that data|validation list on worksheet, you may find that this doesn't work. Debra Dalgleish explains the xl97 bug at: http://contextures.com/xlDataVal08.html#Change Her work around is to place a button next to the cell with Data|Validation and then click the button after choosing the name. FA wrote: This forum is of great help!!!!!!!!!!!!!!!!!!!!! Thank you very much. "Dave Peterson" wrote: This seemed to work under light testing... Right click on the worksheet tab that holds the data|validation cell. Select view code and paste this into the code window: Option Explicit Private Sub Worksheet_Change(ByVal Target As Range) If Target.Cells.Count 1 Then Exit Sub If Intersect(Target, Me.Range("E1")) Is Nothing Then Exit Sub Application.EnableEvents = False Worksheets("sheet2").PivotTables("Pivottable1") _ .PageFields("Name").CurrentPage = Target.Value Application.EnableEvents = True End Sub You'll have to modify the worksheet name that holds the pivottable, the name of the pivottable, the name of the page field, the address of the cell with the data|validation. I used Sheet2, Pivottable1, Name, and E1. FA wrote: Hello, I need to explian better. Name is included in the page field. But it has too many names. The data validation in another page includes selected names. The purpose is to make easier for users to select the names that they need. The data is shown for the selected name in graphical form. I have all that set. I want users to select a name and be able to see the data for that name. It is a lot of data so it would be better if with the selection of the names in one page changes the name field in the pivot table. How can I do that? Is it possible? Thank you! "Dave Peterson" wrote: I would think it would be easiest if you made the name column a page field in the pivottable. It'll even look kind of like data|validation. FA wrote: I have a cell that includes a list of names (data validation). I want the pivot table page field to change following the name selected. How can I do this? Is it better with a combo box? Thank you! -- Dave Peterson -- Dave Peterson -- Dave Peterson |
#9
![]() |
|||
|
|||
![]()
So some names are 8 characters and some are 30. And you can't see all 30
characters when the dropdown opens. About the best you can do is to widen that column. Another option is to merge a couple of cells and use that merge area for data|validation. But merged cells can make life difficult--sorting, filtering, .... FA wrote: You see, that is the problem, after one success one becomes greedy: Now I want the data validation field to adjust to the different lenghts that the list of names has. Any suggestions? "Dave Peterson" wrote: Just in case... If you are using xl97 and have that data|validation list on worksheet, you may find that this doesn't work. Debra Dalgleish explains the xl97 bug at: http://contextures.com/xlDataVal08.html#Change Her work around is to place a button next to the cell with Data|Validation and then click the button after choosing the name. FA wrote: This forum is of great help!!!!!!!!!!!!!!!!!!!!! Thank you very much. "Dave Peterson" wrote: This seemed to work under light testing... Right click on the worksheet tab that holds the data|validation cell. Select view code and paste this into the code window: Option Explicit Private Sub Worksheet_Change(ByVal Target As Range) If Target.Cells.Count 1 Then Exit Sub If Intersect(Target, Me.Range("E1")) Is Nothing Then Exit Sub Application.EnableEvents = False Worksheets("sheet2").PivotTables("Pivottable1") _ .PageFields("Name").CurrentPage = Target.Value Application.EnableEvents = True End Sub You'll have to modify the worksheet name that holds the pivottable, the name of the pivottable, the name of the page field, the address of the cell with the data|validation. I used Sheet2, Pivottable1, Name, and E1. FA wrote: Hello, I need to explian better. Name is included in the page field. But it has too many names. The data validation in another page includes selected names. The purpose is to make easier for users to select the names that they need. The data is shown for the selected name in graphical form. I have all that set. I want users to select a name and be able to see the data for that name. It is a lot of data so it would be better if with the selection of the names in one page changes the name field in the pivot table. How can I do that? Is it possible? Thank you! "Dave Peterson" wrote: I would think it would be easiest if you made the name column a page field in the pivottable. It'll even look kind of like data|validation. FA wrote: I have a cell that includes a list of names (data validation). I want the pivot table page field to change following the name selected. How can I do this? Is it better with a combo box? Thank you! -- Dave Peterson -- Dave Peterson -- Dave Peterson -- Dave Peterson |
#10
![]() |
|||
|
|||
![]()
Ps.
Select a couple of cells (like A1:B1) and then format|cells|alignment tab|check merge cells FA wrote: You see, that is the problem, after one success one becomes greedy: Now I want the data validation field to adjust to the different lenghts that the list of names has. Any suggestions? "Dave Peterson" wrote: Just in case... If you are using xl97 and have that data|validation list on worksheet, you may find that this doesn't work. Debra Dalgleish explains the xl97 bug at: http://contextures.com/xlDataVal08.html#Change Her work around is to place a button next to the cell with Data|Validation and then click the button after choosing the name. FA wrote: This forum is of great help!!!!!!!!!!!!!!!!!!!!! Thank you very much. "Dave Peterson" wrote: This seemed to work under light testing... Right click on the worksheet tab that holds the data|validation cell. Select view code and paste this into the code window: Option Explicit Private Sub Worksheet_Change(ByVal Target As Range) If Target.Cells.Count 1 Then Exit Sub If Intersect(Target, Me.Range("E1")) Is Nothing Then Exit Sub Application.EnableEvents = False Worksheets("sheet2").PivotTables("Pivottable1") _ .PageFields("Name").CurrentPage = Target.Value Application.EnableEvents = True End Sub You'll have to modify the worksheet name that holds the pivottable, the name of the pivottable, the name of the page field, the address of the cell with the data|validation. I used Sheet2, Pivottable1, Name, and E1. FA wrote: Hello, I need to explian better. Name is included in the page field. But it has too many names. The data validation in another page includes selected names. The purpose is to make easier for users to select the names that they need. The data is shown for the selected name in graphical form. I have all that set. I want users to select a name and be able to see the data for that name. It is a lot of data so it would be better if with the selection of the names in one page changes the name field in the pivot table. How can I do that? Is it possible? Thank you! "Dave Peterson" wrote: I would think it would be easiest if you made the name column a page field in the pivottable. It'll even look kind of like data|validation. FA wrote: I have a cell that includes a list of names (data validation). I want the pivot table page field to change following the name selected. How can I do this? Is it better with a combo box? Thank you! -- Dave Peterson -- Dave Peterson -- Dave Peterson -- Dave Peterson |
#11
![]() |
|||
|
|||
![]()
Remove Grand Total from the list of names. That's not a name that occurs in
your data. FA wrote: One more thing: The list of names excluding Grand Total... "Dave Peterson" wrote: Just in case... If you are using xl97 and have that data|validation list on worksheet, you may find that this doesn't work. Debra Dalgleish explains the xl97 bug at: http://contextures.com/xlDataVal08.html#Change Her work around is to place a button next to the cell with Data|Validation and then click the button after choosing the name. FA wrote: This forum is of great help!!!!!!!!!!!!!!!!!!!!! Thank you very much. "Dave Peterson" wrote: This seemed to work under light testing... Right click on the worksheet tab that holds the data|validation cell. Select view code and paste this into the code window: Option Explicit Private Sub Worksheet_Change(ByVal Target As Range) If Target.Cells.Count 1 Then Exit Sub If Intersect(Target, Me.Range("E1")) Is Nothing Then Exit Sub Application.EnableEvents = False Worksheets("sheet2").PivotTables("Pivottable1") _ .PageFields("Name").CurrentPage = Target.Value Application.EnableEvents = True End Sub You'll have to modify the worksheet name that holds the pivottable, the name of the pivottable, the name of the page field, the address of the cell with the data|validation. I used Sheet2, Pivottable1, Name, and E1. FA wrote: Hello, I need to explian better. Name is included in the page field. But it has too many names. The data validation in another page includes selected names. The purpose is to make easier for users to select the names that they need. The data is shown for the selected name in graphical form. I have all that set. I want users to select a name and be able to see the data for that name. It is a lot of data so it would be better if with the selection of the names in one page changes the name field in the pivot table. How can I do that? Is it possible? Thank you! "Dave Peterson" wrote: I would think it would be easiest if you made the name column a page field in the pivottable. It'll even look kind of like data|validation. FA wrote: I have a cell that includes a list of names (data validation). I want the pivot table page field to change following the name selected. How can I do this? Is it better with a combo box? Thank you! -- Dave Peterson -- Dave Peterson -- Dave Peterson -- Dave Peterson |
#12
![]() |
|||
|
|||
![]()
That was quick. But I think my question was not worded right. Plesae excuse
me as english is not my first language. Here I go: I want to include another data validation field that controls another pivot table filed, this time in the same spreadsheet. This drop down will change the list of names. Sometimes the list is longer sometimes is shorter. I would like it to be automatically adjusted to the list of names excluding the grand total name. The other thing is that I would like to hide the other sheet. Right now I can't do it and run the change. Your help is great... maybe you can suggest some reading... "Dave Peterson" wrote: Remove Grand Total from the list of names. That's not a name that occurs in your data. FA wrote: One more thing: The list of names excluding Grand Total... "Dave Peterson" wrote: Just in case... If you are using xl97 and have that data|validation list on worksheet, you may find that this doesn't work. Debra Dalgleish explains the xl97 bug at: http://contextures.com/xlDataVal08.html#Change Her work around is to place a button next to the cell with Data|Validation and then click the button after choosing the name. FA wrote: This forum is of great help!!!!!!!!!!!!!!!!!!!!! Thank you very much. "Dave Peterson" wrote: This seemed to work under light testing... Right click on the worksheet tab that holds the data|validation cell. Select view code and paste this into the code window: Option Explicit Private Sub Worksheet_Change(ByVal Target As Range) If Target.Cells.Count 1 Then Exit Sub If Intersect(Target, Me.Range("E1")) Is Nothing Then Exit Sub Application.EnableEvents = False Worksheets("sheet2").PivotTables("Pivottable1") _ .PageFields("Name").CurrentPage = Target.Value Application.EnableEvents = True End Sub You'll have to modify the worksheet name that holds the pivottable, the name of the pivottable, the name of the page field, the address of the cell with the data|validation. I used Sheet2, Pivottable1, Name, and E1. FA wrote: Hello, I need to explian better. Name is included in the page field. But it has too many names. The data validation in another page includes selected names. The purpose is to make easier for users to select the names that they need. The data is shown for the selected name in graphical form. I have all that set. I want users to select a name and be able to see the data for that name. It is a lot of data so it would be better if with the selection of the names in one page changes the name field in the pivot table. How can I do that? Is it possible? Thank you! "Dave Peterson" wrote: I would think it would be easiest if you made the name column a page field in the pivottable. It'll even look kind of like data|validation. FA wrote: I have a cell that includes a list of names (data validation). I want the pivot table page field to change following the name selected. How can I do this? Is it better with a combo box? Thank you! -- Dave Peterson -- Dave Peterson -- Dave Peterson -- Dave Peterson |
#13
![]() |
|||
|
|||
![]()
Maybe you can use a dynamic range name that grows and contracts with the list.
Debra Dalgleish explains it: http://contextures.com/xlNames01.html#Dynamic I'm not sure why you can't hide the other sheet. There's lots of links: Debra Dalgleish's pictures at Jon Peltier's site: http://peltiertech.com/Excel/Pivots/pivottables.htm And Debra's own site: http://www.contextures.com/xlPivot01.html John Walkenbach also has some at: http://j-walk.com/ss/excel/files/general.htm (look for Tony Gwynn's Hit Database) Chip Pearson keeps Harald Staff's notes at: http://www.cpearson.com/excel/pivots.htm MS has some at (xl2000 and xl2002): http://office.microsoft.com/downloads/2000/XCrtPiv.aspx http://office.microsoft.com/assistan...lconPT101.aspx FA wrote: That was quick. But I think my question was not worded right. Plesae excuse me as english is not my first language. Here I go: I want to include another data validation field that controls another pivot table filed, this time in the same spreadsheet. This drop down will change the list of names. Sometimes the list is longer sometimes is shorter. I would like it to be automatically adjusted to the list of names excluding the grand total name. The other thing is that I would like to hide the other sheet. Right now I can't do it and run the change. Your help is great... maybe you can suggest some reading... "Dave Peterson" wrote: Remove Grand Total from the list of names. That's not a name that occurs in your data. FA wrote: One more thing: The list of names excluding Grand Total... "Dave Peterson" wrote: Just in case... If you are using xl97 and have that data|validation list on worksheet, you may find that this doesn't work. Debra Dalgleish explains the xl97 bug at: http://contextures.com/xlDataVal08.html#Change Her work around is to place a button next to the cell with Data|Validation and then click the button after choosing the name. FA wrote: This forum is of great help!!!!!!!!!!!!!!!!!!!!! Thank you very much. "Dave Peterson" wrote: This seemed to work under light testing... Right click on the worksheet tab that holds the data|validation cell. Select view code and paste this into the code window: Option Explicit Private Sub Worksheet_Change(ByVal Target As Range) If Target.Cells.Count 1 Then Exit Sub If Intersect(Target, Me.Range("E1")) Is Nothing Then Exit Sub Application.EnableEvents = False Worksheets("sheet2").PivotTables("Pivottable1") _ .PageFields("Name").CurrentPage = Target.Value Application.EnableEvents = True End Sub You'll have to modify the worksheet name that holds the pivottable, the name of the pivottable, the name of the page field, the address of the cell with the data|validation. I used Sheet2, Pivottable1, Name, and E1. FA wrote: Hello, I need to explian better. Name is included in the page field. But it has too many names. The data validation in another page includes selected names. The purpose is to make easier for users to select the names that they need. The data is shown for the selected name in graphical form. I have all that set. I want users to select a name and be able to see the data for that name. It is a lot of data so it would be better if with the selection of the names in one page changes the name field in the pivot table. How can I do that? Is it possible? Thank you! "Dave Peterson" wrote: I would think it would be easiest if you made the name column a page field in the pivottable. It'll even look kind of like data|validation. FA wrote: I have a cell that includes a list of names (data validation). I want the pivot table page field to change following the name selected. How can I do this? Is it better with a combo box? Thank you! -- Dave Peterson -- Dave Peterson -- Dave Peterson -- Dave Peterson -- Dave Peterson |
#14
![]() |
|||
|
|||
![]()
The offset formula worked for the size of the list.
I can't hide the sheet because it select the sheet in the command for the data validation. How can I include two data validation fields that make a pivot table action? I copied the code but it didn't work. Thanks again, FA "Dave Peterson" wrote: Maybe you can use a dynamic range name that grows and contracts with the list. Debra Dalgleish explains it: http://contextures.com/xlNames01.html#Dynamic I'm not sure why you can't hide the other sheet. There's lots of links: Debra Dalgleish's pictures at Jon Peltier's site: http://peltiertech.com/Excel/Pivots/pivottables.htm And Debra's own site: http://www.contextures.com/xlPivot01.html John Walkenbach also has some at: http://j-walk.com/ss/excel/files/general.htm (look for Tony Gwynn's Hit Database) Chip Pearson keeps Harald Staff's notes at: http://www.cpearson.com/excel/pivots.htm MS has some at (xl2000 and xl2002): http://office.microsoft.com/downloads/2000/XCrtPiv.aspx http://office.microsoft.com/assistan...lconPT101.aspx FA wrote: That was quick. But I think my question was not worded right. Plesae excuse me as english is not my first language. Here I go: I want to include another data validation field that controls another pivot table filed, this time in the same spreadsheet. This drop down will change the list of names. Sometimes the list is longer sometimes is shorter. I would like it to be automatically adjusted to the list of names excluding the grand total name. The other thing is that I would like to hide the other sheet. Right now I can't do it and run the change. Your help is great... maybe you can suggest some reading... "Dave Peterson" wrote: Remove Grand Total from the list of names. That's not a name that occurs in your data. FA wrote: One more thing: The list of names excluding Grand Total... "Dave Peterson" wrote: Just in case... If you are using xl97 and have that data|validation list on worksheet, you may find that this doesn't work. Debra Dalgleish explains the xl97 bug at: http://contextures.com/xlDataVal08.html#Change Her work around is to place a button next to the cell with Data|Validation and then click the button after choosing the name. FA wrote: This forum is of great help!!!!!!!!!!!!!!!!!!!!! Thank you very much. "Dave Peterson" wrote: This seemed to work under light testing... Right click on the worksheet tab that holds the data|validation cell. Select view code and paste this into the code window: Option Explicit Private Sub Worksheet_Change(ByVal Target As Range) If Target.Cells.Count 1 Then Exit Sub If Intersect(Target, Me.Range("E1")) Is Nothing Then Exit Sub Application.EnableEvents = False Worksheets("sheet2").PivotTables("Pivottable1") _ .PageFields("Name").CurrentPage = Target.Value Application.EnableEvents = True End Sub You'll have to modify the worksheet name that holds the pivottable, the name of the pivottable, the name of the page field, the address of the cell with the data|validation. I used Sheet2, Pivottable1, Name, and E1. FA wrote: Hello, I need to explian better. Name is included in the page field. But it has too many names. The data validation in another page includes selected names. The purpose is to make easier for users to select the names that they need. The data is shown for the selected name in graphical form. I have all that set. I want users to select a name and be able to see the data for that name. It is a lot of data so it would be better if with the selection of the names in one page changes the name field in the pivot table. How can I do that? Is it possible? Thank you! "Dave Peterson" wrote: I would think it would be easiest if you made the name column a page field in the pivottable. It'll even look kind of like data|validation. FA wrote: I have a cell that includes a list of names (data validation). I want the pivot table page field to change following the name selected. How can I do this? Is it better with a combo box? Thank you! -- Dave Peterson -- Dave Peterson -- Dave Peterson -- Dave Peterson -- Dave Peterson |
#15
![]() |
|||
|
|||
![]()
I don't understand what you mean about selecting the sheet for the
data|validation stuff. I would have guessed that you set up data|validation manually (using a range name on that other sheet). Then that other sheet doesn't have to be selected. And maybe if you have two cells and two page fields: Option Explicit Private Sub Worksheet_Change(ByVal Target As Range) If Target.Cells.Count 1 Then Exit Sub If Intersect(Target, Me.Range("E1,F1")) Is Nothing Then Exit Sub Application.EnableEvents = False Select Case LCase(Target.Address(0, 0)) Case Is = "e1" Worksheets("sheet2").PivotTables("Pivottable1") _ .PageFields("Name1").CurrentPage = Target.Value Case Is = "f1" Worksheets("sheet2").PivotTables("Pivottable1") _ .PageFields("Name2").CurrentPage = Target.Value End Select Application.EnableEvents = True End Sub (untested, but it did compile.) FA wrote: The offset formula worked for the size of the list. I can't hide the sheet because it select the sheet in the command for the data validation. How can I include two data validation fields that make a pivot table action? I copied the code but it didn't work. Thanks again, FA "Dave Peterson" wrote: Maybe you can use a dynamic range name that grows and contracts with the list. Debra Dalgleish explains it: http://contextures.com/xlNames01.html#Dynamic I'm not sure why you can't hide the other sheet. There's lots of links: Debra Dalgleish's pictures at Jon Peltier's site: http://peltiertech.com/Excel/Pivots/pivottables.htm And Debra's own site: http://www.contextures.com/xlPivot01.html John Walkenbach also has some at: http://j-walk.com/ss/excel/files/general.htm (look for Tony Gwynn's Hit Database) Chip Pearson keeps Harald Staff's notes at: http://www.cpearson.com/excel/pivots.htm MS has some at (xl2000 and xl2002): http://office.microsoft.com/downloads/2000/XCrtPiv.aspx http://office.microsoft.com/assistan...lconPT101.aspx FA wrote: That was quick. But I think my question was not worded right. Plesae excuse me as english is not my first language. Here I go: I want to include another data validation field that controls another pivot table filed, this time in the same spreadsheet. This drop down will change the list of names. Sometimes the list is longer sometimes is shorter. I would like it to be automatically adjusted to the list of names excluding the grand total name. The other thing is that I would like to hide the other sheet. Right now I can't do it and run the change. Your help is great... maybe you can suggest some reading... "Dave Peterson" wrote: Remove Grand Total from the list of names. That's not a name that occurs in your data. FA wrote: One more thing: The list of names excluding Grand Total... "Dave Peterson" wrote: Just in case... If you are using xl97 and have that data|validation list on worksheet, you may find that this doesn't work. Debra Dalgleish explains the xl97 bug at: http://contextures.com/xlDataVal08.html#Change Her work around is to place a button next to the cell with Data|Validation and then click the button after choosing the name. FA wrote: This forum is of great help!!!!!!!!!!!!!!!!!!!!! Thank you very much. "Dave Peterson" wrote: This seemed to work under light testing... Right click on the worksheet tab that holds the data|validation cell. Select view code and paste this into the code window: Option Explicit Private Sub Worksheet_Change(ByVal Target As Range) If Target.Cells.Count 1 Then Exit Sub If Intersect(Target, Me.Range("E1")) Is Nothing Then Exit Sub Application.EnableEvents = False Worksheets("sheet2").PivotTables("Pivottable1") _ .PageFields("Name").CurrentPage = Target.Value Application.EnableEvents = True End Sub You'll have to modify the worksheet name that holds the pivottable, the name of the pivottable, the name of the page field, the address of the cell with the data|validation. I used Sheet2, Pivottable1, Name, and E1. FA wrote: Hello, I need to explian better. Name is included in the page field. But it has too many names. The data validation in another page includes selected names. The purpose is to make easier for users to select the names that they need. The data is shown for the selected name in graphical form. I have all that set. I want users to select a name and be able to see the data for that name. It is a lot of data so it would be better if with the selection of the names in one page changes the name field in the pivot table. How can I do that? Is it possible? Thank you! "Dave Peterson" wrote: I would think it would be easiest if you made the name column a page field in the pivottable. It'll even look kind of like data|validation. FA wrote: I have a cell that includes a list of names (data validation). I want the pivot table page field to change following the name selected. How can I do this? Is it better with a combo box? Thank you! -- Dave Peterson -- Dave Peterson -- Dave Peterson -- Dave Peterson -- Dave Peterson -- Dave Peterson |
#16
![]() |
|||
|
|||
![]()
You are right I can hide the sheet. It works now.
But the code to use two data validation fields (independent from each other) do not work. You have been of great help. How can I do this? "Dave Peterson" wrote: I don't understand what you mean about selecting the sheet for the data|validation stuff. I would have guessed that you set up data|validation manually (using a range name on that other sheet). Then that other sheet doesn't have to be selected. And maybe if you have two cells and two page fields: Option Explicit Private Sub Worksheet_Change(ByVal Target As Range) If Target.Cells.Count 1 Then Exit Sub If Intersect(Target, Me.Range("E1,F1")) Is Nothing Then Exit Sub Application.EnableEvents = False Select Case LCase(Target.Address(0, 0)) Case Is = "e1" Worksheets("sheet2").PivotTables("Pivottable1") _ .PageFields("Name1").CurrentPage = Target.Value Case Is = "f1" Worksheets("sheet2").PivotTables("Pivottable1") _ .PageFields("Name2").CurrentPage = Target.Value End Select Application.EnableEvents = True End Sub (untested, but it did compile.) FA wrote: The offset formula worked for the size of the list. I can't hide the sheet because it select the sheet in the command for the data validation. How can I include two data validation fields that make a pivot table action? I copied the code but it didn't work. Thanks again, FA "Dave Peterson" wrote: Maybe you can use a dynamic range name that grows and contracts with the list. Debra Dalgleish explains it: http://contextures.com/xlNames01.html#Dynamic I'm not sure why you can't hide the other sheet. There's lots of links: Debra Dalgleish's pictures at Jon Peltier's site: http://peltiertech.com/Excel/Pivots/pivottables.htm And Debra's own site: http://www.contextures.com/xlPivot01.html John Walkenbach also has some at: http://j-walk.com/ss/excel/files/general.htm (look for Tony Gwynn's Hit Database) Chip Pearson keeps Harald Staff's notes at: http://www.cpearson.com/excel/pivots.htm MS has some at (xl2000 and xl2002): http://office.microsoft.com/downloads/2000/XCrtPiv.aspx http://office.microsoft.com/assistan...lconPT101.aspx FA wrote: That was quick. But I think my question was not worded right. Plesae excuse me as english is not my first language. Here I go: I want to include another data validation field that controls another pivot table filed, this time in the same spreadsheet. This drop down will change the list of names. Sometimes the list is longer sometimes is shorter. I would like it to be automatically adjusted to the list of names excluding the grand total name. The other thing is that I would like to hide the other sheet. Right now I can't do it and run the change. Your help is great... maybe you can suggest some reading... "Dave Peterson" wrote: Remove Grand Total from the list of names. That's not a name that occurs in your data. FA wrote: One more thing: The list of names excluding Grand Total... "Dave Peterson" wrote: Just in case... If you are using xl97 and have that data|validation list on worksheet, you may find that this doesn't work. Debra Dalgleish explains the xl97 bug at: http://contextures.com/xlDataVal08.html#Change Her work around is to place a button next to the cell with Data|Validation and then click the button after choosing the name. FA wrote: This forum is of great help!!!!!!!!!!!!!!!!!!!!! Thank you very much. "Dave Peterson" wrote: This seemed to work under light testing... Right click on the worksheet tab that holds the data|validation cell. Select view code and paste this into the code window: Option Explicit Private Sub Worksheet_Change(ByVal Target As Range) If Target.Cells.Count 1 Then Exit Sub If Intersect(Target, Me.Range("E1")) Is Nothing Then Exit Sub Application.EnableEvents = False Worksheets("sheet2").PivotTables("Pivottable1") _ .PageFields("Name").CurrentPage = Target.Value Application.EnableEvents = True End Sub You'll have to modify the worksheet name that holds the pivottable, the name of the pivottable, the name of the page field, the address of the cell with the data|validation. I used Sheet2, Pivottable1, Name, and E1. FA wrote: Hello, I need to explian better. Name is included in the page field. But it has too many names. The data validation in another page includes selected names. The purpose is to make easier for users to select the names that they need. The data is shown for the selected name in graphical form. I have all that set. I want users to select a name and be able to see the data for that name. It is a lot of data so it would be better if with the selection of the names in one page changes the name field in the pivot table. How can I do that? Is it possible? Thank you! "Dave Peterson" wrote: I would think it would be easiest if you made the name column a page field in the pivottable. It'll even look kind of like data|validation. FA wrote: I have a cell that includes a list of names (data validation). I want the pivot table page field to change following the name selected. How can I do this? Is it better with a combo box? Thank you! -- Dave Peterson -- Dave Peterson -- Dave Peterson -- Dave Peterson -- Dave Peterson -- Dave Peterson |
#17
![]() |
|||
|
|||
![]()
It worked for me in my simple test.
Are you sure you used the correct pivottable name? Are you sure you used the correct pagefield name? (difficult to guess what went wrong for you.) FA wrote: You are right I can hide the sheet. It works now. But the code to use two data validation fields (independent from each other) do not work. You have been of great help. How can I do this? "Dave Peterson" wrote: I don't understand what you mean about selecting the sheet for the data|validation stuff. I would have guessed that you set up data|validation manually (using a range name on that other sheet). Then that other sheet doesn't have to be selected. And maybe if you have two cells and two page fields: Option Explicit Private Sub Worksheet_Change(ByVal Target As Range) If Target.Cells.Count 1 Then Exit Sub If Intersect(Target, Me.Range("E1,F1")) Is Nothing Then Exit Sub Application.EnableEvents = False Select Case LCase(Target.Address(0, 0)) Case Is = "e1" Worksheets("sheet2").PivotTables("Pivottable1") _ .PageFields("Name1").CurrentPage = Target.Value Case Is = "f1" Worksheets("sheet2").PivotTables("Pivottable1") _ .PageFields("Name2").CurrentPage = Target.Value End Select Application.EnableEvents = True End Sub (untested, but it did compile.) FA wrote: The offset formula worked for the size of the list. I can't hide the sheet because it select the sheet in the command for the data validation. How can I include two data validation fields that make a pivot table action? I copied the code but it didn't work. Thanks again, FA "Dave Peterson" wrote: Maybe you can use a dynamic range name that grows and contracts with the list. Debra Dalgleish explains it: http://contextures.com/xlNames01.html#Dynamic I'm not sure why you can't hide the other sheet. There's lots of links: Debra Dalgleish's pictures at Jon Peltier's site: http://peltiertech.com/Excel/Pivots/pivottables.htm And Debra's own site: http://www.contextures.com/xlPivot01.html John Walkenbach also has some at: http://j-walk.com/ss/excel/files/general.htm (look for Tony Gwynn's Hit Database) Chip Pearson keeps Harald Staff's notes at: http://www.cpearson.com/excel/pivots.htm MS has some at (xl2000 and xl2002): http://office.microsoft.com/downloads/2000/XCrtPiv.aspx http://office.microsoft.com/assistan...lconPT101.aspx FA wrote: That was quick. But I think my question was not worded right. Plesae excuse me as english is not my first language. Here I go: I want to include another data validation field that controls another pivot table filed, this time in the same spreadsheet. This drop down will change the list of names. Sometimes the list is longer sometimes is shorter. I would like it to be automatically adjusted to the list of names excluding the grand total name. The other thing is that I would like to hide the other sheet. Right now I can't do it and run the change. Your help is great... maybe you can suggest some reading... "Dave Peterson" wrote: Remove Grand Total from the list of names. That's not a name that occurs in your data. FA wrote: One more thing: The list of names excluding Grand Total... "Dave Peterson" wrote: Just in case... If you are using xl97 and have that data|validation list on worksheet, you may find that this doesn't work. Debra Dalgleish explains the xl97 bug at: http://contextures.com/xlDataVal08.html#Change Her work around is to place a button next to the cell with Data|Validation and then click the button after choosing the name. FA wrote: This forum is of great help!!!!!!!!!!!!!!!!!!!!! Thank you very much. "Dave Peterson" wrote: This seemed to work under light testing... Right click on the worksheet tab that holds the data|validation cell. Select view code and paste this into the code window: Option Explicit Private Sub Worksheet_Change(ByVal Target As Range) If Target.Cells.Count 1 Then Exit Sub If Intersect(Target, Me.Range("E1")) Is Nothing Then Exit Sub Application.EnableEvents = False Worksheets("sheet2").PivotTables("Pivottable1") _ .PageFields("Name").CurrentPage = Target.Value Application.EnableEvents = True End Sub You'll have to modify the worksheet name that holds the pivottable, the name of the pivottable, the name of the page field, the address of the cell with the data|validation. I used Sheet2, Pivottable1, Name, and E1. FA wrote: Hello, I need to explian better. Name is included in the page field. But it has too many names. The data validation in another page includes selected names. The purpose is to make easier for users to select the names that they need. The data is shown for the selected name in graphical form. I have all that set. I want users to select a name and be able to see the data for that name. It is a lot of data so it would be better if with the selection of the names in one page changes the name field in the pivot table. How can I do that? Is it possible? Thank you! "Dave Peterson" wrote: I would think it would be easiest if you made the name column a page field in the pivottable. It'll even look kind of like data|validation. FA wrote: I have a cell that includes a list of names (data validation). I want the pivot table page field to change following the name selected. How can I do this? Is it better with a combo box? Thank you! -- Dave Peterson -- Dave Peterson -- Dave Peterson -- Dave Peterson -- Dave Peterson -- Dave Peterson -- Dave Peterson |
#18
![]() |
|||
|
|||
![]()
I presented my work and obtained great feedback. For that I thank you.
Good Luck! "Dave Peterson" wrote: It worked for me in my simple test. Are you sure you used the correct pivottable name? Are you sure you used the correct pagefield name? (difficult to guess what went wrong for you.) FA wrote: You are right I can hide the sheet. It works now. But the code to use two data validation fields (independent from each other) do not work. You have been of great help. How can I do this? "Dave Peterson" wrote: I don't understand what you mean about selecting the sheet for the data|validation stuff. I would have guessed that you set up data|validation manually (using a range name on that other sheet). Then that other sheet doesn't have to be selected. And maybe if you have two cells and two page fields: Option Explicit Private Sub Worksheet_Change(ByVal Target As Range) If Target.Cells.Count 1 Then Exit Sub If Intersect(Target, Me.Range("E1,F1")) Is Nothing Then Exit Sub Application.EnableEvents = False Select Case LCase(Target.Address(0, 0)) Case Is = "e1" Worksheets("sheet2").PivotTables("Pivottable1") _ .PageFields("Name1").CurrentPage = Target.Value Case Is = "f1" Worksheets("sheet2").PivotTables("Pivottable1") _ .PageFields("Name2").CurrentPage = Target.Value End Select Application.EnableEvents = True End Sub (untested, but it did compile.) FA wrote: The offset formula worked for the size of the list. I can't hide the sheet because it select the sheet in the command for the data validation. How can I include two data validation fields that make a pivot table action? I copied the code but it didn't work. Thanks again, FA "Dave Peterson" wrote: Maybe you can use a dynamic range name that grows and contracts with the list. Debra Dalgleish explains it: http://contextures.com/xlNames01.html#Dynamic I'm not sure why you can't hide the other sheet. There's lots of links: Debra Dalgleish's pictures at Jon Peltier's site: http://peltiertech.com/Excel/Pivots/pivottables.htm And Debra's own site: http://www.contextures.com/xlPivot01.html John Walkenbach also has some at: http://j-walk.com/ss/excel/files/general.htm (look for Tony Gwynn's Hit Database) Chip Pearson keeps Harald Staff's notes at: http://www.cpearson.com/excel/pivots.htm MS has some at (xl2000 and xl2002): http://office.microsoft.com/downloads/2000/XCrtPiv.aspx http://office.microsoft.com/assistan...lconPT101.aspx FA wrote: That was quick. But I think my question was not worded right. Plesae excuse me as english is not my first language. Here I go: I want to include another data validation field that controls another pivot table filed, this time in the same spreadsheet. This drop down will change the list of names. Sometimes the list is longer sometimes is shorter. I would like it to be automatically adjusted to the list of names excluding the grand total name. The other thing is that I would like to hide the other sheet. Right now I can't do it and run the change. Your help is great... maybe you can suggest some reading... "Dave Peterson" wrote: Remove Grand Total from the list of names. That's not a name that occurs in your data. FA wrote: One more thing: The list of names excluding Grand Total... "Dave Peterson" wrote: Just in case... If you are using xl97 and have that data|validation list on worksheet, you may find that this doesn't work. Debra Dalgleish explains the xl97 bug at: http://contextures.com/xlDataVal08.html#Change Her work around is to place a button next to the cell with Data|Validation and then click the button after choosing the name. FA wrote: This forum is of great help!!!!!!!!!!!!!!!!!!!!! Thank you very much. "Dave Peterson" wrote: This seemed to work under light testing... Right click on the worksheet tab that holds the data|validation cell. Select view code and paste this into the code window: Option Explicit Private Sub Worksheet_Change(ByVal Target As Range) If Target.Cells.Count 1 Then Exit Sub If Intersect(Target, Me.Range("E1")) Is Nothing Then Exit Sub Application.EnableEvents = False Worksheets("sheet2").PivotTables("Pivottable1") _ .PageFields("Name").CurrentPage = Target.Value Application.EnableEvents = True End Sub You'll have to modify the worksheet name that holds the pivottable, the name of the pivottable, the name of the page field, the address of the cell with the data|validation. I used Sheet2, Pivottable1, Name, and E1. FA wrote: Hello, I need to explian better. Name is included in the page field. But it has too many names. The data validation in another page includes selected names. The purpose is to make easier for users to select the names that they need. The data is shown for the selected name in graphical form. I have all that set. I want users to select a name and be able to see the data for that name. It is a lot of data so it would be better if with the selection of the names in one page changes the name field in the pivot table. How can I do that? Is it possible? Thank you! "Dave Peterson" wrote: I would think it would be easiest if you made the name column a page field in the pivottable. It'll even look kind of like data|validation. FA wrote: I have a cell that includes a list of names (data validation). I want the pivot table page field to change following the name selected. How can I do this? Is it better with a combo box? Thank you! -- Dave Peterson -- Dave Peterson -- Dave Peterson -- Dave Peterson -- Dave Peterson -- Dave Peterson -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
data validation lists | Excel Discussion (Misc queries) | |||
Error Message with Data Validation | Excel Discussion (Misc queries) | |||
data validation | Excel Worksheet Functions | |||
Data Validation | Excel Discussion (Misc queries) | |||
Using Validation List from Another Workbook with Dependent Data | Excel Worksheet Functions |