Brand new to lemmy, sorry if this is the wrong place to ask…

My code experience is half of Harvard’s CS50 and a handful of hours on the game bitburner. Fairly useless at code, sorry.

Tl;Dr - how can I code like ~200 pivot tables in excel to choose an item from a list in their filter? The data isn’t what I need to manipulate; after refresh, the list is already in the pivot table. It’s simply making the first pivot table choose the first item and the second, choosing the second item, 200 times. I appreciate any and all insight. Thank you.


My work has a very dumb process. We enter data to a special program, then download that data from it up to 4 times a week to manually paste in excel. Then refresh all ~200 pivot tables (which refreshes all at once), then manually enter a filter selection for each of those ~200 pivot tables.

It’s extremely tedious. The pivot tables, after we click the filter box, show a check box to select blank, or select item 1 thru 200. We click the filter, check the box for item 1, click okay.

Scroll to and select the next pivot table filter for item 2, rinse and repeat 200 times.

The pivot tables have the data and are set up after the download and pasting. All I need is a way to automate selecting this stupid box with 3 clicks. Select ‘pivot table 1’s filter,’ then select ‘item 1,’ then select ‘okay.’

Everything I find on coding to manipulate pivot tables is for manipulating the data already in a pivot table.

I’ve tried recording a script in Excel and it gives “This action is not yet recordable.” Searching tutorials and trying to find syntax… Nothing.

All the items are input in two places: one with all the data of the pivot, one with a summary of the data under one single name. The pivots pull from that summary. Effectively, the summary has a list of strings inputted to a column’s cell range A2:A200.

I keep thinking if I could automate the refresh and select the pivot tables as an array, then I could loop a second array of that cell range for those strings, I could tell each pivot table to choose array 0, 1, 2, etc; like

Refresh pivots; (which isn’t necessary as the data table could refresh all in one. Pivot table one [0 , 0]. ; Pivot table two [1 , 1]. ; Etc.

It feels so simple, but I don’t know VBA for excel, and cannot find syntax or resources for something so _specific. Python might work but I dont know how to use it and make it manipulate Excel. I feel like I could code this in C from the CS50 stuff I learned, but same as Python, I don’t know how to get it to gel with Excel.

I could suck it up and keep doing it manually, but my God it’s annoying coupled with the 1,000x other tasks I have to do daily. If I can figure out how to save myself the time, I’d be so happy. I appreciate any and all insight. Thank you!