#1   Report Post  
Posted to microsoft.public.excel.programming
Ira Ira is offline
external usenet poster
 
Posts: 18
Default subtotal

I ran subtotals. Now I have to write a code that if total for the group is
more than 1000, then every line item in the group must be devided by 2. Is
there a way to do it in excel?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 471
Default subtotal

I'd create an extra column and put a calculation similar to this in it:

=if(sumif(BreakColumn,Brakeitem=ThisColBrakeItem,O rigCol)1000,OrigCol/2,OrigCol). Then do you subtotals on this new column. HTH.

"Ira" wrote:

I ran subtotals. Now I have to write a code that if total for the group is
more than 1000, then every line item in the group must be devided by 2. Is
there a way to do it in excel?

  #3   Report Post  
Posted to microsoft.public.excel.programming
Ira Ira is offline
external usenet poster
 
Posts: 18
Default subtotal

Thank you, Mike.

"Mike H." wrote:

I'd create an extra column and put a calculation similar to this in it:

=if(sumif(BreakColumn,Brakeitem=ThisColBrakeItem,O rigCol)1000,OrigCol/2,OrigCol). Then do you subtotals on this new column. HTH.

"Ira" wrote:

I ran subtotals. Now I have to write a code that if total for the group is
more than 1000, then every line item in the group must be devided by 2. Is
there a way to do it in excel?

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
Subtotal To Include Item Description On Subtotal Line Tickfarmer Excel Discussion (Misc queries) 2 February 23rd 10 07:56 PM
sort macro, subtotal and add lines after subtotal David Excel Discussion (Misc queries) 1 August 29th 09 10:56 AM
pasting to subtotal lines without replacing hidden -non-subtotal l harleydiva67 Excel Discussion (Misc queries) 1 October 12th 06 06:02 PM
Subtotal of Subtotal displays Grand Total in wrong row Thomas Born Excel Worksheet Functions 5 January 6th 05 01:46 PM
Sort, Subtotal, Label Subtotal, Insert row Teak Excel Programming 2 April 8th 04 04:14 PM


All times are GMT +1. The time now is 11:01 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"