ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   subtotal (https://www.excelbanter.com/excel-programming/412071-subtotal.html)

Ira

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?

Mike H.

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?


Ira

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?



All times are GMT +1. The time now is 10:03 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com