Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Subtracting two Subtotals in the same column

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?
  #2   Report Post  
Posted to microsoft.public.excel.misc
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
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 70
Default Subtracting two Subtotals in the same column

aHey Dave-

Thanks for your help. All of my data is being pulled from my company's
oracle database so sales and purchases are not distinguished by a positive or
a negative.

Is there any way that when i subtotal the sales , I can label that subtotal
as "Sales"
and the purchases as "Purchases" so that the formula can distinguish which
are the "Purchases" and which are the "Sales"? I thank you in advance.












"Dave Peterson" wrote:

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

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Subtracting two Subtotals in the same column

I think I'd use a separate field (a different column) that indicated what the
value represented.

David T wrote:

aHey Dave-

Thanks for your help. All of my data is being pulled from my company's
oracle database so sales and purchases are not distinguished by a positive or
a negative.

Is there any way that when i subtotal the sales , I can label that subtotal
as "Sales"
and the purchases as "Purchases" so that the formula can distinguish which
are the "Purchases" and which are the "Sales"? I thank you in advance.

"Dave Peterson" wrote:

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


--

Dave Peterson
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
Stock data manipulation [email protected] Excel Worksheet Functions 1 June 12th 06 11:06 PM
Column picked randomly with probability relative to number of entr Neil Goldwasser Excel Worksheet Functions 4 May 30th 06 08:55 AM
Return SEARCHED Column Number of Numeric Label and Value Sam via OfficeKB.com Excel Worksheet Functions 23 January 30th 06 06:16 PM
Positioning Numeric Values Resulting from 6 Column Array Formula Sam via OfficeKB.com Excel Worksheet Functions 2 January 5th 06 02:03 AM
Return Count for LAST NonBlank Cell in each Row Sam via OfficeKB.com Excel Worksheet Functions 12 April 17th 05 10:36 PM


All times are GMT +1. The time now is 12:08 PM.

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"