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

Seeker picture Seeker · Jun 25, 2012 · Viewed 12.3k times · Source

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?

Answer

twalberg picture twalberg · Jun 25, 2012

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.