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

  • Thread starter Thread starter mike
  • Start date Start date
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
 
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})
 
Back
Top