Hi all,
I am using Excel 2013 to build a production schedule, with the main schedule located on a worksheet called "Schedule" and a production template for each job on a worksheet called "Template." The job information is in the first few columns, then each column represents a week. When a week has passed, I hide the column - I don't want to delete it as I may need to refer back to it. However, this has caused problems with parts of the template pasting into hidden cells when I try to add new jobs. I've been working on solving the problem with code that I found in this thread: http://www.mrexcel.com/forum/excel-...applications-paste-special-visible-cells.html
Unfortunately, I'm getting a 1004 error (can't paste because copy area and paste area aren't the same size) when I try to run it, even if I adjust the end column out to compensate for the hidden columns.
(FYI, I've tried doing a standard copy/paste from the template in two chunks on either side of the hidden cells, but parts of the production data link to the job information, and all the links break if I do it this way.)
Could someone please help me figure out how to fix this?
Thank you!
I am using Excel 2013 to build a production schedule, with the main schedule located on a worksheet called "Schedule" and a production template for each job on a worksheet called "Template." The job information is in the first few columns, then each column represents a week. When a week has passed, I hide the column - I don't want to delete it as I may need to refer back to it. However, this has caused problems with parts of the template pasting into hidden cells when I try to add new jobs. I've been working on solving the problem with code that I found in this thread: http://www.mrexcel.com/forum/excel-...applications-paste-special-visible-cells.html
Code:
Sub PASTEtoVISIBLE_Click()
Worksheets("TEMPLATE").Range("A3:BA21").Copy
Worksheets("SCHEDULE").Range("a313:ba331").SpecialCells(xlCellTypeVisible).PasteSpecial
End Sub
Unfortunately, I'm getting a 1004 error (can't paste because copy area and paste area aren't the same size) when I try to run it, even if I adjust the end column out to compensate for the hidden columns.
(FYI, I've tried doing a standard copy/paste from the template in two chunks on either side of the hidden cells, but parts of the production data link to the job information, and all the links break if I do it this way.)
Could someone please help me figure out how to fix this?
Thank you!
Last edited: