Arvi's formula works fine.
If it was returning a static result, then your Calculation mode must have been set to manual.
Yes, that is a volatile function, however the non-volatile Index formula will return the wrong result unless you add 1 to the value in your box D12
Code:
=SUM(INDEX(L7:Q7,B12):INDEX(L7:Q7,D12+1))