Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
Premium Land with House for Sale
anil1961
Updated:
Friday at 10:15 AM
AWS Certified Solutions Architect-Associate + AWS Certified Cloud Practitioner
Sanjeewani95
Updated:
Wednesday at 8:16 PM
🚀 එක පැකේජ් එකයි - මාසෙටම Unlimited Internet! 🌐
sayuru bandara
Updated:
Aug 18, 2026
🎬 CapCut Pro 1 Month Access! LKR 600
sayuru bandara
Updated:
Aug 18, 2026
🚀 Google One AI PRO Plan (Gemini Pro Activation) – 18 Months Access! LKR 2200
sayuru bandara
Updated:
Aug 18, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
General
ElaKiri Talk!
Excel උදව්වක් දෙන්න පුළුවන් කව්ද ඉන්නේ
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="your_love" data-source="post: 30149070" data-attributes="member: 398316"><p>The approach you're using is based on distributing `Cost1` and `Cost2` values proportionally across items by their weights (for Cost1) and units (for Cost2), which is sound. However, simplifying or optimizing the method for clarity and ease of understanding is possible by focusing on two main things:</p><p></p><p>1. **Cost Distribution Based on Kg (Weight)**: </p><p> For `Cost1`, it seems you're distributing costs based on the total weight (`Total KG`) in proportion to the individual item’s weight.</p><p> </p><p>2. **Cost Distribution Based on Units**: </p><p> For `Cost2`, you're distributing costs based on the total number of units.</p><p></p><p>### A Simpler Formula:</p><p>You can reduce the complexity by dividing the total cost (`Cost1` or `Cost2`) by the total `Kg` or `Units` once, instead of using SUMIF in the denominator multiple times. Here's a straightforward approach:</p><p></p><p>#### **For `Cost1` (Apportion by Kg):**</p><p>- Instead of using the SUMIF formula to get the total weight repeatedly, calculate the total weight for each invoice once and store it in a helper column.</p><p> </p><p> Formula in the helper column (for `Total Kg`):</p><p> - `=SUMIF($B$3:$B$6, B11, $C$3:$C$6)`</p><p> </p><p> Then, in `Cost1`:</p><p> - `=(VLOOKUP(B11, $B$3:$E$6, 4, FALSE) / <Total_Kg_for_this_Invoice>) * C11`</p><p> </p><p> This simplifies to:</p><p> - `=VLOOKUP(B11, $B$3:$E$6, 4, FALSE) / <HelperColumnValue> * C11`</p><p></p><p>#### **For `Cost2` (Apportion by Units):**</p><p>- Similarly, instead of recalculating the sum of units for each invoice, use the helper column to store the total number of units.</p><p></p><p> Formula in helper column (for `Total Units`):</p><p> - `=SUMIF($B$3:$B$6, B11, $D$3:$D$6)`</p><p> </p><p> Then, in `Cost2`:</p><p> - `=(VLOOKUP(B11, $B$3:$F$6, 5, FALSE) / <Total_Units_for_this_Invoice>) * D11`</p><p> </p><p> This simplifies to:</p><p> - `=VLOOKUP(B11, $B$3:$F$6, 5, FALSE) / <HelperColumnValue> * D11`</p><p></p><p>### Pivot Table Compatibility</p><p>Ensure that the final table (`P001-P0019`) matches the structure of the first table, and when you create a pivot table:</p><p>- `Total Cost1` should equal the sum of apportioned `Cost1`.</p><p>- `Total Cost2` should equal the sum of apportioned `Cost2`.</p><p></p><p>### In Summary:</p><p>1. Use helper columns to pre-calculate total Kg and Units per invoice, simplifying formulas.</p><p>2. Apply the apportioning formula to each row without repeatedly calculating totals within the formula.</p><p> </p><p>By storing intermediate results (e.g., total Kg and total Units) in a helper column, the formulas will be clearer and potentially faster, especially in large datasets.</p><p></p><p>Let me know if you'd like me to demonstrate how this would look or if you need any further adjustments! (<strong>Powered by Chatgpt</strong>)</p></blockquote><p></p>
[QUOTE="your_love, post: 30149070, member: 398316"] The approach you're using is based on distributing `Cost1` and `Cost2` values proportionally across items by their weights (for Cost1) and units (for Cost2), which is sound. However, simplifying or optimizing the method for clarity and ease of understanding is possible by focusing on two main things: 1. **Cost Distribution Based on Kg (Weight)**: For `Cost1`, it seems you're distributing costs based on the total weight (`Total KG`) in proportion to the individual item’s weight. 2. **Cost Distribution Based on Units**: For `Cost2`, you're distributing costs based on the total number of units. ### A Simpler Formula: You can reduce the complexity by dividing the total cost (`Cost1` or `Cost2`) by the total `Kg` or `Units` once, instead of using SUMIF in the denominator multiple times. Here's a straightforward approach: #### **For `Cost1` (Apportion by Kg):** - Instead of using the SUMIF formula to get the total weight repeatedly, calculate the total weight for each invoice once and store it in a helper column. Formula in the helper column (for `Total Kg`): - `=SUMIF($B$3:$B$6, B11, $C$3:$C$6)` Then, in `Cost1`: - `=(VLOOKUP(B11, $B$3:$E$6, 4, FALSE) / <Total_Kg_for_this_Invoice>) * C11` This simplifies to: - `=VLOOKUP(B11, $B$3:$E$6, 4, FALSE) / <HelperColumnValue> * C11` #### **For `Cost2` (Apportion by Units):** - Similarly, instead of recalculating the sum of units for each invoice, use the helper column to store the total number of units. Formula in helper column (for `Total Units`): - `=SUMIF($B$3:$B$6, B11, $D$3:$D$6)` Then, in `Cost2`: - `=(VLOOKUP(B11, $B$3:$F$6, 5, FALSE) / <Total_Units_for_this_Invoice>) * D11` This simplifies to: - `=VLOOKUP(B11, $B$3:$F$6, 5, FALSE) / <HelperColumnValue> * D11` ### Pivot Table Compatibility Ensure that the final table (`P001-P0019`) matches the structure of the first table, and when you create a pivot table: - `Total Cost1` should equal the sum of apportioned `Cost1`. - `Total Cost2` should equal the sum of apportioned `Cost2`. ### In Summary: 1. Use helper columns to pre-calculate total Kg and Units per invoice, simplifying formulas. 2. Apply the apportioning formula to each row without repeatedly calculating totals within the formula. By storing intermediate results (e.g., total Kg and total Units) in a helper column, the formulas will be clearer and potentially faster, especially in large datasets. Let me know if you'd like me to demonstrate how this would look or if you need any further adjustments! ([B]Powered by Chatgpt[/B]) [/QUOTE]
Insert quotes…
Verification
Asuwa dahayen wadi kalama keeyada?
Post reply
Top
Bottom