21

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?

zb226
  • 9,586
  • 6
  • 49
  • 79
Seeker
  • 1,250
  • 1
  • 16
  • 23

2 Answers2

35

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.

zb226
  • 9,586
  • 6
  • 49
  • 79
twalberg
  • 59,951
  • 11
  • 89
  • 84
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.

Seeker
  • 1,250
  • 1
  • 16
  • 23