"Duke Carey" wrote...
Try
=XNPV(N3,indirect("Q"&cell_reference&":Q190,N"&ce ll_reference&":N190")
"Tex1960" wrote:
....
=XNPV(N3,Q#:Q190,N#:N190)
Testing is good. It often prevents posting huge mistakes.
First off, Duke's formula is a syntax error due to unmatched left and right
parentheses. Even if a second right parenthesis were added at the end, it'd
still be a syntax error since XNPV requires 3 arguments. Simply put, 2
separate INDIRECT calls would be needed.
An alternative:
=XNPV(N3,OFFSET(Q1:Q190,x,0,190-x,1),OFFSET(N1:N190,x,0,190-x,1))
OFFSET has the advantage of adapting its first argument when columns are
inserted/deleted between columns N and Q or rows inserted above row 1.
|