Results 1 to 20 of 20

Calculate according to proper size

Threaded View

  1. #1
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Calculate according to proper size

    Hello everyone
    I have in sheet1 a number of products 1 , 2 , 3 in column B and each product consists of 4 items A , B , C and D in column C
    In column D there are different sizes of each item
    In row 1 in range ("F1:Q1") there are fixed sizes that I need to see the proper size for each item

    * Note : the first item "A" is essential and should occur only at least for once
    * The second item "B" would be 1 or 2 or 3 or more according to the available size in row 1
    ---------------------------------------------------------------------------------------
    Examples :

    1) As for the value in F1 is 1.500 - the expected result would be in range("F5:F8")
    suppose A = 1 and B =1 >> so 1 * 0.280 + 1 * 0.600 = 0.880

    Now we see the proper item (from "A" or "C" or "D") that will be close to 1.500 but it must be equal to 1.500 or smaller a little than this size
    If we add 0.880 + item "A" (0.280) = 1.160
    If we add 0.880 + item "C" (1.800) = 2.680
    If we add 0.880 + item "D" (0.880) = 1.760
    NOW let's the code determine the closest area of the three results 1.160 / 2.680 / 1.760 >>> the nearest one is 1.160

    Finally the result in range("F5:F8") would be as following : F5 = 2 / F6 = 1 / F7 ="x" / F8 = "x" and F9 would have the remaining size which is calculated
    (1.500 - 1.160) which will equal 0.340

    --->> in summary the first item "A" is essential that should be 1 at least then the second item "B" would be flexible ( 1 / 2 / 3 or more according to
    the available size ) then there must be one of the three items "A" or "C" or "D" according to the remaining size (the choice will be the nearest ..
    equal to less than the fixed size in row 1)
    2) Another example :
    In range("J11:J15") :
    In J14 will be "x" as there is no size related to item "D"
    item "A" will be 1 which equals to 0.060
    item "C" will be 1 which equals to 1.02
    item "B" will be changeable to suit the desired size in J1 so I do it manually and reached 10 as 10 * 0.080 = 0.8
    Now the total of the three items will be 1.880 (0.060 + 1.02 + 0.8)
    In J15 will be the remaining which is 1.900 - 1.880 = 0.020


    I know this is complicated issue but I hope to find help in this topic
    Thanks advanced for help

    * the thread is posted here too
    http://www.eileenslounge.com/viewtopic.php?f=30&t=28955

    * Sample file edited a little
    Attached Files Attached Files
    Last edited by YasserKhalil; 01-25-2018 at 05:04 PM.
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. VBA Code to calculate Xbar-Bar with varying subgroup size
    By ironfelix717 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-22-2017, 04:15 PM
  2. Calculate dimensions of needed box based on size of machine being packed???
    By Denny Morgan in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-28-2012, 05:36 AM
  3. [SOLVED] Need to calculate price from size and quantity selection
    By TheGecko in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-23-2012, 09:14 AM
  4. Replies: 2
    Last Post: 03-15-2012, 12:11 AM
  5. calculate the batch size
    By dtgheath in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-15-2010, 09:46 AM
  6. calculate the quantity of each size of an item
    By kimcole5 in forum Excel General
    Replies: 2
    Last Post: 11-26-2008, 01:32 PM
  7. Calculate prices using values entered by size
    By keascheer in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-12-2008, 12:57 AM

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