Nikita
Nikita

Reputation: 155

Copying Formula for Microsoft Excel by drag and drop

I'd like to understand how to gain more control when I drag a formula to other cells.

The problem I have is:

I have a formula that is "=SUM(Assumptions!C12:D28)", which I'd like to drag several times in the same row so that I have "Sum(Assumptions!C12:E28)", "Sum(Assumptions!C12:F28)", etc.

When I mark the first formula and drag it to the right in my row I instead get "=Sum(Assumptions!D12:E28)" and "=Sum(Assumptions!E12:F28)", etc.

How can I avoid this?

Upvotes: 0

Views: 61

Answers (1)

bzimor
bzimor

Reputation: 1628

If you want to get first value of your formula locked, just put$ in front of range or select C12 and press F4 until you get $C12. Then your formula looks like that:

=SUM(Assumptions!$C12:D28)

$ sign in front of row index and column index means, if you fill handle or copy paste your formula, row or column index will not change. For example:

$C$12 - Column C and row 12 never change if you copy paste formula;

$C12 - Column C never change if you copy paste formula;

C$12 - Row 12 never change if you copy paste formula.

Upvotes: 1

Related Questions