using the offset function to subtract a cell in b column from cell in a instead of adding

M

mike

I know how to use the offset function to add a1+b1 and have the result
in c1. The formula is =SUM(OFFSET(C1,0,-2,1,2))

however, what if I wish to subtract a1-b1? How will the formula have
to be then using the offset function?

thanks,
mike
 
H

Harlan Grove

mike said:
I know how to use the offset function to add a1+b1 and have the result
in c1. The formula is =SUM(OFFSET(C1,0,-2,1,2))

however, what if I wish to subtract a1-b1? How will the formula have
to be then using the offset function?

=SUMPRODUCT(OFFSET(C1,0,-2,1,2),{1,-1})
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top