Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 184
Default Excel Formula Help With Subtraction

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

  #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

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default Excel Formula Help With Subtraction

Put in C2

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

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

"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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple subtraction formula returning strange results = Excel glitc Ginger Excel Worksheet Functions 13 April 1st 09 07:12 PM
subtraction formula kaustubhghag Excel Worksheet Functions 1 March 24th 06 12:14 PM
Subtraction formula Al Excel Discussion (Misc queries) 6 December 21st 05 08:46 AM
Excel should have a simpler subtraction formula similar to "sum". Darius Excel Worksheet Functions 5 February 21st 05 11:14 PM
how do i do a subtraction formula jules Excel Worksheet Functions 3 December 30th 04 03:43 AM


All times are GMT +1. The time now is 08:14 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"