Beautifull ! Just what I needed, but couldn't find.
Thanks a lot !
I have a sheet 'table' with X projects (in this example 15), all with a unique name, collected in a table named ‘Projectdata’. (for this example an extreme simplification of the real data table I use)
I have a second sheet 'pivot table' with a pivot table connected to table ‘Projectdata’, with a filter on the column ‘project’ and an output of the data from phase 1,2 and 3. I have added a Slicer named ‘projectname’ to control the filter.
My question:
Is it possible to write a macro in Excel that:
1.) Selects a predetermined cell from sheet ‘table’(for example cell B3 in table ‘Projectdata’ ; value= 2PK002)
2.) Copies the text from the formula bar ! (NOT from the cell itself).
3.) Selects a predetermined cell that controls a filter for a pivot table (in example cell B1 in sheet ‘pivot table’)
4.) Pastes the value into the formula bar! (NOT into the cell, because that doesn’t work), thereby changing the filter from the pivot table.
Because this works when you do it manually, I suppose it is doable by macro, but when recording my actions it doesn’t really translate into a macro. My knowledge of writing macro’s is limited and I am at a loss.
Btw…My main goal is to be able to paste the text value from column B in table ‘Projectdata’, when preceded by an ‘x’ in column ‘print’, paste that value into the cell that controls the filter for the pivoting table, Then make a pdf export from the pivotable with my pdfprinter, go on to the next value from column B in the table ‘Projectdata’ precede by an x in column ‘print’ till I have exports for all the marked projects. Then I can go into the printer dialog box and merge all pdf’s into a multisheet pdf document.
Thanks in advance !
LennertN
Bookmarks