View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Subtracting two Subtotals in the same column

Have you thought about using positive numbers for one (sales or purchases) and
negative numbers for the other (purchases or sales)?

Then you could just sum the column to get the net amount.

Or put an indicator in another column (Say column E) and use that:

=sumif(e:e,"Sales",d:d) - sumif(e:e,"Purchase",d:d)

or
=sumif(e:e,"Sales Total",d:d) - sumif(e:e,"Purchases Total",d:d)

Or whatever you have to indicate the grand totals.

David T wrote:

I'm using an excel macros to subtotal my sales and purchases. All my sales
transcation are listed on top of my purchases and there are several blank
lines to separate the two. How do I subtract the grand total of my sales
from the grand total of purchases if both grand totals are on the same
column? Since the amount of sales and purchases transactions varies, i don't
know the exact cell that either one of the grand total will be in. I do know
that they will be in column "D".

Is there a formula that can find the grand total of the purchases and sales
and subtract them?


--

Dave Peterson