Excel Formula Help With Subtraction

J

Jeremy

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
 
P

PJ

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.
 
J

Joel

Put in C2

=if(A1=A2,B2-B1,"")

Copy down column. Since C1 will never have any results leave it blank.
 

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