VBA code to move data from Pivot Table to unhidden columns on a different sheet?

xxbc320xx

New Member
Joined
Mar 27, 2020
Messages
14
Office Version
  1. 365
Platform
  1. Windows
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.
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.

Forum statistics

Threads
1,223,214
Messages
6,170,771
Members
452,353
Latest member
strainu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top