How to keep one field fixed in a formular when using auto-fill?
Asked Answered
K

2

22

I want to autofill a formula to a bunch of fields in one column. I can do that by filling two fields manually then select them and drag down.

I want column B's cells to be =D1*A1 , =D1*A2,... Note D1 should not change.

When I drag the fields down or use (Edit > Fill...) it changes D1 to D2, D3,... How can I keep one field fixed for autofill?

Holding ctrl button down does not help.

Any idea?

Knighterrantry answered 25/6, 2012 at 19:5 Comment(0)
R
38

Make your "master" formula =D$1*A1. That flags the 1 in the D$1 part as being constant. You could also make the D part constant with =$D$1*A1, but since you stated this is a single column, it shouldn't matter in this case.

Note that this also works for Microsoft Excel, and I think that it's been a common feature of almost all spreadsheets since way back to supercalc on HDOS.

Reiner answered 25/6, 2012 at 19:28 Comment(0)
K
5

I just found another way (that is not easier than twalberg's, but worth mentioning)...

You can define a name (Insert > Names... Define). Select a field and give it a name. Then the name in your formulas.

Knighterrantry answered 25/6, 2012 at 20:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.