Wednesday, December 30, 2009

On Excel, how do I copy a formula to another cell without the numbers and letters within the formula changing?

I want to copy a formula (=a1*a2) in cell a3 to cell b3 without the formula changing.On Excel, how do I copy a formula to another cell without the numbers and letters within the formula changing?
You need to use ';absolute addressing'; in the original formula. This is done with the dollar sign. That is, you need to change your original formula to read:





=$a$1*$a$2





From now on, every time you copy the formula, it will not change. If you had the formula





=a$1*a$2





then only the letters (columns) would change, not the rows.





If you have a bunch of formulas you need to change, you can use the search and replace function (ctrl-H).On Excel, how do I copy a formula to another cell without the numbers and letters within the formula changing?
Two options:





Click on the cell A3, then click above in the formula editor. Copy the formula, then hit ESC. Click in cell B3 and hit paste.





or





Click on the cell A3, then click above in the formula editor. With the cursor near the text 'a1', hit F4 once (you will see dollar signs appear; this means that the cell reference is ';locked'; and won't change when you drag or copy cell contents. Do the same for a2 and then just drag A3 into B3.
You can put a $ (Dollar Sign) in front of the value you don't want to change. If you don't want the A to change, put it as $A1, if you want the Number not to change put A$1, if you don't want them to both to not change use $a$1.
double click in a3. Highlight (drag cursor) the formula =a1*a2 and copy (ctrl+c), then hit Esc. (or you could just copy it from here). Position cursor in b3 and paste (ctrl+v).


You could get the same effect by putting in b3 the formula =a3
I don't think you can do that unless the formula uses absolute references:





=SUM($A$1*$A$2)





Paste/Special/Formula still changes any relative references.
write the formula =$a1*$a2





The $ keeps the thing after it from changing.





Ordinarily, in this move,the ';a'; would change to ';b';





The $ will prevent that.





Grandpa






cut and paste


or put $ signs around it like this:


=$a$1*$a$2, then you can copy paste anywhere.
I think its something in ';paste special';

No comments:

Post a Comment