Excel VBA Course
Excel VBA Course - From Beginner to Expert

200+ Video Lessons
50+ Hours of Video
200+ Excel Guides

Become a master of VBA and Macros in Excel and learn how to automate all of your tasks in Excel with this online course. (No VBA experience required.)

View Course

copy formula

0

how can I copy a formula into another cell but not the text in the cell?

Answer
Discuss

Answers

0
Selected Answer

Hello Bren51 and welcome to the Forum.

To copy a formula to another cell, copy the first cell with a formula (e.g. Ctrl+C) then in the new cell, use the Home ribbon, press the down arrow of Paste and click the icon including fx - if you hover over it and it will show "Formulas (F)"

Discuss

Discussion

thank you very much! that works:)
Bren521 (rep: 2) Feb 19, '21 at 3:08 am
Add to Discussion
1

You can't do that because there is only either a formula or text in a cell. When you copy a cell you copy whatever is in it.

However, there is a way to copy the result of a formula instead of the formula. That's the opposite of what your are asking

Formulas can have absolute or relative references. Here is an example. Copy these two formulas to B1 and C1 and enter anything in A1.

[B1] =A1
or
[C1] =$A$1

Now both B1 and C1 will show whatever you entered in A1. When you change A1 both other cells will follow.

Now copy B1:C down by 1 row. The first formula will have changed.

[B2] =A2
and
[C2] =$A$1

The formula in C2 uses absolute references. It hasn't changed and C2 now reflects the content of A1 same as C1. You get the impression that the cell's text was copied. It wasn't. Its the formula which was copied and it still refers to A1.

The formula in B2 was changed because the reference is relative (no $ signs). That formula now points to A2 and cannpt, therefore, show the same text as A1.

Note that there are two $ signs, one for the row and one for the column. The signs are without any effect until the formula is copied. At that time the row or column preceded by a $ sign will not change to adapt to the formula's new location.

Discuss

Discussion

thank you!
Bren521 (rep: 2) Feb 19, '21 at 3:18 am
@Variatus- some good learning points for Bren there!
John_Ru (rep: 6142) Feb 19, '21 at 3:40 am
@John_Ru Pease refrain from comments of this type. This one is likely to offend both Brent and me and contributes nothing to the subject at hand or the forum at large.
Variatus (rep: 4889) Feb 19, '21 at 3:50 am
Add to Discussion


Answer the Question

You must create an account to use the forum. Create an Account or Login