+ Reply to Thread
Results 1 to 26 of 26

Adjust weight based on Slab, Total must be same

  1. #1
    Forum Contributor
    Join Date
    04-06-2016
    Location
    Singapore
    MS-Off Ver
    MS Office 365 & 2010
    Posts
    698

    Adjust weight based on Slab, Total must be same

    Hi Friends,

    From lot of days I am suffering with accurate formula for below problem. Please see attachment and advice me, Thank you advance.

    I have two slabs as E column

    A2 weight is 25450, so I adjust it to 23570 (like Random value of 23700)
    A3 weight is 27460, so I adjust it to random value of E3 (like Random value of 2700)
    A4 weight is 25560, so I adjust it to random value of E3 (like Random value of 2700)
    A5 weight is 21450, so I adjust it to random value of E2(like Random value of 23700)

    Main thing is below 25500 value can reduce to below 23700
    above 25500 value can increase upto 27700
    but total must be same, adjusted weight should automatically adjust based on net weight total
    Attached Files Attached Files
    Last edited by rajeshn_in; 02-25-2017 at 06:18 AM.

  2. #2
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,935

    Re: Adjust weight based on Slab, Total must be same

    Quote Originally Posted by rajeshn_in View Post

    A2 weight is 25450, so I adjust it to 23570 (like Randam value of 23700)
    A3 weight is 27460, so I adjust it to randam value of E3 (like Randam value of 2700)
    A4 weight is 25560, so I adjust it to randam value of E3 (like Randam value of 2700)
    A5 weight is 21450, so I adjust it to randam value of E2(like Randam value of 23700)

    Main thing is below 25500 value can reduce to below 23700
    above 25500 value can increase upto 27700
    but total must be same, adjusted weight should automatically adjust based on net weight total
    A2 weight is 25450 how can you adjust it to 23570

    Please explain???
    If I helped, Don't forget to add reputation (click on the little star ★ at bottom of this post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)

  3. #3
    Forum Contributor
    Join Date
    04-06-2016
    Location
    Singapore
    MS-Off Ver
    MS Office 365 & 2010
    Posts
    698

    Re: Adjust weight based on Slab, Total must be same

    Because Charges are different for 1st slab and 2nd slab, So I want to reduce charges atleast one item, and adjust that extra weight into another item.

  4. #4
    Forum Contributor
    Join Date
    04-06-2016
    Location
    Singapore
    MS-Off Ver
    MS Office 365 & 2010
    Posts
    698

    Re: Adjust weight based on Slab, Total must be same

    For example Slab 1 = 1$, Slab 2 = 2$,
    So, In that 4 Containers, actually I need to pay 2$ for each Container.
    with adjustment I can pay 3 containers as 2$ for each, and for 1 container as 1$ for each, at the end I can save 1$, just like that.
    Last edited by rajeshn_in; 02-25-2017 at 06:39 AM.

  5. #5
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,935

    Re: Adjust weight based on Slab, Total must be same

    Try with a helper column

    H2
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    drag down

    Result in
    I2
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    drag down

    Check the attached file.
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    04-06-2016
    Location
    Singapore
    MS-Off Ver
    MS Office 365 & 2010
    Posts
    698

    Re: Adjust weight based on Slab, Total must be same

    Thank you, Shukla, one small update. in number last digit must be 0, no need decimals. in your file result as below
    23033.5
    26833.5
    27090.5
    22962.5


    I want like
    23030
    26830
    27090
    22960

    Please update.

  7. #7
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,148

    Re: Adjust weight based on Slab, Total must be same

    Try

    in I2:I4

    =CEILING(H2-($H$6-$A$6)/4,10)

    in I5

    $A$6-SUM($I$2:$I$4)
    Attached Files Attached Files

  8. #8
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,935

    Re: Adjust weight based on Slab, Total must be same

    Quote Originally Posted by rajeshn_in View Post
    Thank you, Shukla, one small update. in number last digit must be 0, no need decimals. in your file result as below
    23033.5
    26833.5
    27090.5
    22962.5


    I want like
    23030
    26830
    27090
    22960

    Please update.
    That would happen as you need to match your number A6.

    If you'll press f9 key three to four time is it will give your number without decimal

  9. #9
    Forum Contributor
    Join Date
    04-06-2016
    Location
    Singapore
    MS-Off Ver
    MS Office 365 & 2010
    Posts
    698

    Re: Adjust weight based on Slab, Total must be same

    Hi John,

    You formula 95% working, Thank you.

    But, Because of Random formula, H column cell values are frequently changing, how can I control that without "copy value past".


    One more thing is If I am using 100 containers, then total not coming same. Please see attachment.

    Thank you for your Patience.......
    Attached Files Attached Files

  10. #10
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,148

    Re: Adjust weight based on Slab, Total must be same

    You cannot if you are using any RAND function (except perhaps with VBA).

    Re 100: it would work if only you followed what I said in my post #7:

    in I101

    =$A$102-SUM($I$2:$I$100)

    which ensures the LAST slab is the value required to meet the total

  11. #11
    Forum Contributor
    Join Date
    04-06-2016
    Location
    Singapore
    MS-Off Ver
    MS Office 365 & 2010
    Posts
    698

    Re: Adjust weight based on Slab, Total must be same

    Ooh, ok, than u john,

  12. #12
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,935

    Re: Adjust weight based on Slab, Total must be same

    Quote Originally Posted by rajeshn_in View Post
    Hi John,

    You formula 95% working, Thank you.

    But, Because of Random formula, H column cell values are frequently changing, how can I control that without "copy value past".


    One more thing is If I am using 100 containers, then total not coming same. Please see attachment.

    Thank you for your Patience.......

    You can try with another helper column.

    Try

    H2
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    I2
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    J2
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Check the attached file.
    Attached Files Attached Files

  13. #13
    Forum Contributor
    Join Date
    04-06-2016
    Location
    Singapore
    MS-Off Ver
    MS Office 365 & 2010
    Posts
    698

    Re: Adjust weight based on Slab, Total must be same

    Hi Shukla,

    Please check attachment, at result column, I am getting values either above 23700 or 27700, I think helper 2 not coming as my required. Please check and update.

    Can we control Helper 2, like values must be below 23700 or 27700 like that.

    Main think is all values must be below 27700.
    Attached Files Attached Files
    Last edited by rajeshn_in; 02-26-2017 at 12:45 AM.

  14. #14
    Forum Contributor
    Join Date
    04-06-2016
    Location
    Singapore
    MS-Off Ver
    MS Office 365 & 2010
    Posts
    698

    Re: Adjust weight based on Slab, Total must be same

    Hi John Topley,

    Please check attachment, at result column, I am getting values either above 23700 or 27700, I think result column value not coming as my requirement. Please check and update.

    Can we control result column, like values must be below 23700 or 27700 like that.

    Main think is all values must be below 27700.
    Attached Files Attached Files
    Last edited by rajeshn_in; 02-26-2017 at 12:45 AM.

  15. #15
    Forum Contributor
    Join Date
    04-06-2016
    Location
    Singapore
    MS-Off Ver
    MS Office 365 & 2010
    Posts
    698

    Re: Adjust weight based on Slab, Total must be same

    Please replay as early as possible

  16. #16
    Forum Contributor
    Join Date
    04-06-2016
    Location
    Singapore
    MS-Off Ver
    MS Office 365 & 2010
    Posts
    698

    Re: Adjust weight based on Slab, Total must be same

    Sorry, its not solved, please check, All Values must be below 27700, And some values can be adjust under 23700 in given attachment, but its not working.
    Attached Files Attached Files
    Last edited by rajeshn_in; 02-26-2017 at 01:12 AM.

  17. #17
    Forum Contributor
    Join Date
    04-06-2016
    Location
    Singapore
    MS-Off Ver
    MS Office 365 & 2010
    Posts
    698

    Re: Adjust weight based on Slab, Total must be same

    Sorry, its not solved, please check, All Values must be below 27700, And some values can be adjust under 23700 in given attachment, but its not working.
    Attached Files Attached Files
    Last edited by rajeshn_in; 02-26-2017 at 01:12 AM.

  18. #18
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,148

    Re: Adjust weight based on Slab, Total must be same

    Why not make all containers the average (rounded to nearest 10) and the lat container the balance:

    So in your file 99 containers are 25290 and 100th is 24790.

    They all then in the lower bracket (< 25500).

  19. #19
    Forum Contributor
    Join Date
    04-06-2016
    Location
    Singapore
    MS-Off Ver
    MS Office 365 & 2010
    Posts
    698

    Re: Adjust weight based on Slab, Total must be same

    Hi John,

    Thank you for your reply.

    I need max containers to fall on the slab 23700... only in case we can't fit in this it should go under 27700, maximum weight is 27700.

    Ex: I have 2 containers like 25000, 25000, I can adjust it like 23670, 26330, So that 25500 is not important, Main aim is to reduce some container weight and adjust balance weight in other containers.

  20. #20
    Forum Contributor
    Join Date
    04-06-2016
    Location
    Singapore
    MS-Off Ver
    MS Office 365 & 2010
    Posts
    698

    Re: Adjust weight based on Slab, Total must be same

    One more thing is if container weight is 27490, so its very far from 23700, so we can't reduce this container, but any way we can adjust it to 27690, so that we can use this difference 200 in another container.

  21. #21
    Forum Expert avk's Avatar
    Join Date
    07-12-2007
    Location
    India
    MS-Off Ver
    Microsoft Office 2013
    Posts
    3,223

    Re: Adjust weight based on Slab, Total must be same

    Dear Rajesh, Refer attach file, in this file value distribution based on first two cell (Highlighted). I think this is similar with your requirement.
    Attached Files Attached Files


    atul


    If my answer (or that of other members) has helped you, please say "Thanks" by clicking the Add Reputation button at the foot of one of their posts.

    Also: if your problem is solved, please take the time to mark your thread as SOLVED by going to the top of your first post, selecting "Thread Tools" and then "Mark thread as solved".

  22. #22
    Forum Contributor
    Join Date
    04-06-2016
    Location
    Singapore
    MS-Off Ver
    MS Office 365 & 2010
    Posts
    698

    Re: Adjust weight based on Slab, Total must be same

    Hi AVK,

    Thank you for your replay. actually I didn't understand, Can you please apply this formula into my sheet, then I can understand easily.

    Thank you.

  23. #23
    Forum Expert avk's Avatar
    Join Date
    07-12-2007
    Location
    India
    MS-Off Ver
    Microsoft Office 2013
    Posts
    3,223

    Re: Adjust weight based on Slab, Total must be same

    Attach your latest updated file with actual required output (mentioned exact value manually).

  24. #24
    Forum Contributor
    Join Date
    04-06-2016
    Location
    Singapore
    MS-Off Ver
    MS Office 365 & 2010
    Posts
    698

    Re: Adjust weight based on Slab, Total must be same

    Please check attachment.

    I have two slabs 1) below 23700, 2) below 27700, Try to put maximum container weights in Slab 1, otherwise Slab 2, Maximum values is 27700.
    Attached Files Attached Files

  25. #25
    Forum Expert avk's Avatar
    Join Date
    07-12-2007
    Location
    India
    MS-Off Ver
    Microsoft Office 2013
    Posts
    3,223

    Re: Adjust weight based on Slab, Total must be same

    I have attach file. Kindly refer. In this file i calculated with criteria min, max (yellow cell) & Avg (Green cell)
    Attached Files Attached Files

  26. #26
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,148

    Re: Adjust weight based on Slab, Total must be same

    Attached find maximum slabs at 23700 and remainder at 27700 with "balance" in slab 100.

    Other than this I have other ideas: I'll leave it to the mathematicians.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. weight slab
    By hemantp450 in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 07-26-2016, 08:42 AM
  2. Slab based billing formula in excel
    By redwarez in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-02-2015, 10:50 AM
  3. Help calculating the total weight lost from starting weight D1
    By rgainey201 in forum Excel - New Users/Basics
    Replies: 7
    Last Post: 12-31-2014, 06:16 PM
  4. vba to pull data based on the quality slab
    By prabhuduraraj09 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-09-2014, 11:48 AM
  5. How to calculate transport cost from distance & weight slab
    By linardni in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-18-2013, 12:02 PM
  6. Computing amount based on slab rates
    By anandvh in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-28-2012, 08:21 PM
  7. Select and adjust a value based on a total
    By Allison in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 08-16-2006, 06:25 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1