问题描述:

This should be I hope a simple question.

I have a simple formula in a cell, worksheet name is Entry

=Entry!D10

I have 5 cells all with similar formulas in them. I want to be able to push a form button and copy the results from these formulas to a new row on another worksheet.

网友答案:

Here is an example to port across formulas without getting the #ref error

Sub Sample()
    Dim ws1 As Worksheet, ws2 As Worksheet

    Set ws1 = ThisWorkbook.Sheets("Sheet1")
    Set ws2 = ThisWorkbook.Sheets("Sheet2")

    ws1.Range("A1").Formula = ws2.Range("C1").Formula
    ws1.Range("D1").Formula = ws2.Range("F1").Formula
End Sub
相关阅读:
Top