View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
PJ PJ is offline
external usenet poster
 
Posts: 112
Default Excel Formula Help With Subtraction

Hi Jeremy

Is this what you need?

In C2 =IF(A1=A2,B2-B1,"") and drag the formula down to the bottom of
your list.

"Jeremy" wrote:

I am looking for a formula to subtract cells if certain criteria match. See
example below.


Data that is given
A B C
1 123 4
2 123 7
3 124 8
4 124 12
5 125 10
6 125 20
7

Data in C with formula
A B C
1 123 4
2 123 7 3
3 124 8
4 124 12 4
5 125 10
6 125 20 10
7