I know you can apply a function/formula by clicking and dragging the bottom right, but I have a certain problem.
My function looks like this
=IF(COUNT(H3:N3)>0;SUMPRODUCT(H2:N2;H3:N3)/SUM(H2:N2);"")
I want all the other rows loook exactly the same, except for the COUNT and the second argument of the SUMPRODUCT.
So the next lines should look like this:
=IF(COUNT(H4:N4)>0;SUMPRODUCT(H2:N2;H4:N4)/SUM(H2:N2);"")
=IF(COUNT(H5:N5)>0;SUMPRODUCT(H2:N2;H5:N5)/SUM(H2:N2);"")
=IF(COUNT(H6:N6)>0;SUMPRODUCT(H2:N2;H6:N6)/SUM(H2:N2);"")
...
So my divisor stays the same and the numbers I multiply with as well (H2:N2).
When I drag by the right corner I always get this:
=IF(COUNT(H4:N4);SUMPRODUCT(H3:U3;H4:U4)/SUM(H3:U3);"")
Is there any way I can do this without changing each formula for each row?
You must freeze the Cell reference using
$:$H$2will keep the reference to both row and column,$H2will keep reference to the column and rearrange row on (vertical) drag,H$2will keep reference to the row and rearrange the column on (horizontal) drag.Microsoft Tip: You can use the F4 key to auto add the dollar signs on your Cell reference.