There is a formula=average(c1:e5) in cell a1, if I...

생성일: 2026년 1월 30일

답변에 사용된 모델 GPT-5.2 Thinking by Chat01

질문

There is a formula=average(c1:e5) in cell a1, if I delete column c, why excel doesn't show !ref error?

사고

Explaining column deletion behavior in Excel formulas

When deleting column C from a formula that references range C1:E5, the referenced cells shift left. Excel adjusts the formula to =AVERAGE(C1:D5) without causing errors. #REF! happens when the deleted range can’t be adjusted, like if all referenced cells are deleted, or deleting the entire referenced range.

Clarifying behavior of deleted columns in Excel formulas

When deleting a column, Excel adjusts the formula range (e.g., =AVERAGE(C1:E5) becomes =AVERAGE(C1:D5) if column C is removed). Clearing contents doesn’t affect the formula. #REF! happens if a referenced column or cell is deleted and can't be adjusted. Deleting an entire referenced column causes a #REF! error.

Thought for 32s

답변

Excel does “lose” the original C cells — but it can still keep the formula valid by shifting and resizing the referenced range.

What happens in your case

You have:

  • A1: =AVERAGE(C1:E5) (that’s 3 columns: C, D, E)

When you delete column C, Excel doesn’t leave a hole. It removes that column and shifts everything to the right one column left:

  • what used to be D1:D5 becomes C1:C5
  • what used to be E1:E5 becomes D1:D5

So Excel rewrites your formula to reference the remaining cells:

  • =AVERAGE(C1:D5) (which corresponds to the old D1:E5)

No #REF! is needed because the reference can be adjusted to a still-existing range.

When you would get #REF!

You typically get #REF! when the formula references something that gets deleted and there’s nothing left to adjust to, for example:

  • =AVERAGE(C1) and you delete column C → becomes =AVERAGE(#REF!)
  • =AVERAGE(C1:C5) and you delete column C → becomes =AVERAGE(#REF!)
  • =AVERAGE(C1:E5) and you delete columns C through E (entire referenced area) → #REF!

So: deleting part of a multi-cell reference usually causes Excel to shrink/shift the range, not error out.

질문

What if I delete column e then?

답변

If you delete column E (the right edge of the range), Excel can still keep the reference valid by shrinking the range.

Starting formula:

  • =AVERAGE(C1:E5)

Delete column E → column E disappears, and columns to the right shift left. Excel adjusts the range to the remaining columns:

  • becomes =AVERAGE(C1:D5)

So again, no #REF!, because the range can be “repaired” by resizing.

You’d get #REF! only if the deletion wipes out the entire referenced range (e.g., delete columns C through E), or if the formula refers to a single cell/entire column that gets deleted (like =AVERAGE(E:E) or =E1).

이 Q&A 공유하기