0

I want to copy all formulas from one sheet to another using VBA. I don't want to copy anything else than the formulas. What is a good way to do this?

To explain with an example, if the source sheet contains:

formula value value blank formula value blank blank formula 

and the target sheet contains:

1 2 3 4 5 6 7 8 9 

I want the target sheet to get the values:

formula 2 3 4 formula 6 7 8 formula 

1 Answer 1

1

How about:

Sub dural() Dim r As Range, ady As String For Each r In Sheets("Sheet1").Cells.SpecialCells(xlCellTypeFormulas) ady = r.Address r.Copy Sheets("Sheet2").Range(ady) Next End Sub 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.