PDA

View Full Version : VBA code to move data from Pivot Table to unhidden columns on a different sheet?



Jimbo2112
01-12-2024, 08:02 AM
I have a workbook that has a number of different sheets in it. Sheet 1 contains a list of items in column A and columns D through Z are hidden or unhidden based on date.
Sheet 3 has a pivot table that is generated from sheet 2. It is 30 different items (all within column A on the sheet 1) with values from 0 to whatever. They are always in the same order.
I would like to automatically fill the cells in sheet 1, column D through Z with the values from the pivot table. I only want to fill the column cells that are NOT hidden.
For example if Column M is not hidden then I want the code to look at the item in Column A and input the value from the pivot table in the corresponding cell in Column M.

Aussiebear
01-12-2024, 01:52 PM
Welcome to VBAX Jimbo. Sorry mate but..... the second paragraph describing what you would like done is akin to spotting a herring in a large school of fish.



I would like to automatically fill the cells in sheet 1, column D through Z with the values from the pivot table. I only want to fill the column cells that are NOT hidden.
For example if Column M is not hidden then I want the code to look at the item in Column A and input the value from the pivot table in the corresponding cell in Column M.

Could you have another go at describing what you'd like done please? Maybe even post a sample workbook would be extremely helpful.