excel - Dragging INDIRECT and -
i thought take through thinking there may better way using indirect achieve desired result if not solution indirect handy.
i had simple formula
=sumproduct($e$10:$e20,j10:j20)
dragged across great number of columns ending somewhere in cc's
however found when inserted row change 10 , $10 11 , $11, placed indirect in there.
=sumproduct(indirect("$e$10:$e20"),indirect("j10:j20"))
i realize i'm referring string , if drag across right, cell references won't update.
so first question how go updating these can drag indirect
across columns right , update cell references formula resemble or @ least work in same way when dragged column k , on.
=sumproduct(indirect("$e$10:$e20"),indirect("k10:k20"))
however
if there better solution indirect keep orignial formula when rows inserted or deleted helpful too.
you have turned both rows , columns static string representations when want guard row designations changing on row insert. replacing indirect functions index functions allow make column e absolute conventional $ , leave column j relative hard-code referenced rows not change on row insert.
=sumproduct((index($e:$e, 10):index($e:$e, 20)), (index(j:j, 10):index(j:j, 20)))
just don't insert columns , should work planned.
on related note, referring "$e$10:$e20" string in indirect may visually identify purpose you've noted, text not going change despite dragging new location or inserting rows. there no difference if use indirect("e10:e20").
Comments
Post a Comment