Hi there. I've got an interesting dilemma.
I'm trying to figure out a way to preserve a cell reference between two templates that are copied and pasted.
Everytime I click a button, another two-column FORM is pasted into the MASTER SHEET. At the same time, I want to copy and paste a summary of that form into a new sheet. The summary exists as a template. I'm trying to preserve the cell references between the new FORM and the new SUMMARY sheet.
That way, I can add Form 1, Form 2, Form 3 in the MASTER SHEET, while having a corresponding summary for each Form on its own sheet.
Any thoughts?
My initial copy and paste for the FORM looks something like this.
Sub addforms()
Select Case Sheets("Attributes").Range("A1") = ""
Case True 'paste in col A if A1 is empty
Sheets("Defaults").Range("A1:F142").Copy Sheets("Attributes").Range("A1")
Case False ' paste to next col
Sheets("Defaults").Range("A1:F142").Copy
Sheets("Attributes").Range("IV1").End(xlToLeft).Offset(0, 5).PasteSpecial Paste:=xlPasteColumnWidths, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
End Select
ActiveSheet.Paste
For Each cell In Range("D4:CC4")
If cell.EntireColumn.Hidden = True Then
Else
If cell.Value = "calc" Then
cell.EntireColumn.Hidden = True
End If
End If
Next cell
End Sub
Bookmarks