+ Reply to Thread
Results 1 to 6 of 6

Multiply quantity by a factor based on product name

  1. #1
    Registered User
    Join Date
    04-19-2015
    Location
    United States
    MS-Off Ver
    365
    Posts
    4

    Multiply quantity by a factor based on product name

    So I am looking for a faster way to do this. Imagine you have a product, that product could could come in quantity of 1-100, and if that product is ProductA then multiply the quantity by 2 to get the number of boxes. If ProductB then multiply the quantity by 1 to determine # of boxes. Then again, create another adjacent cell to determine how many pallets. If Product A,B,... then multiply by 2 to determine # of pallets, but if Product C or D then multiply by 4.

    Goal is to determineScreenshot 2022-05-17 155234.png the number of boxes or pallets based on what the product is and the quantity.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,608

    Re: Multiply quantity by a factor based on product name

    Welcome to the forum.

    There are instructions at the top of the page explaining how to attach your sample workbook.

    A good sample workbook has just 10-20 rows of representative data that has been desensitised. It also has expected results mocked up, relevant cells highlighted and a few explanatory notes.

    Administrative Note:

    Members will tailor the solutions they offer to the version (NOT release number) of Office (Excel, NOT Windows) that you have. Please check that your forum profile is up-to-date in this respect. If you aren't sure, in Excel go to File | Account and report what it says below the MS logo at the top of that page. If your version is for Mac, please also state this. Thanks.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    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,169

    Re: Multiply quantity by a factor based on product name

    Create a "Lookup" table with Product in (say) column A, Boxes/Pallets in column B and factor in Column C or separate Box/Pallet tables.

    Use VLOOKUP function to get the data.
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,608

    Re: Multiply quantity by a factor based on product name

    Something like this in D2 copied across and down:

    =$C2*INDEX($J$2:$K$6,MATCH($B2,$I$2:$I$6,0),MATCH(D$1,$J$1:$K$1,0))

    But are you sure you want to multiply and not divide???

    AliGW on MS365 Beta Channel (Windows 11) 64 bit

    A
    B
    C
    D
    E
    F
    G
    H
    I
    J
    K
    1
    Buyer Product Quantity Boxes Pallets Product Boxes Pallets
    2
    A Px
    10
    20
    80
    Pd
    2
    2
    3
    B Py
    4
    12
    8
    Pk
    3
    2
    4
    D Pt
    75
    225
    150
    Pt
    3
    2
    5
    E Pt
    45
    135
    90
    Px
    2
    8
    6
    H Pd
    23
    46
    46
    Py
    3
    2
    7
    A Pk
    51
    153
    102
    Sheet: Sheet1

    If you need to divide, use this instead:

    =$C2/INDEX($J$2:$K$6,MATCH($B2,$I$2:$I$6,0),MATCH(D$1,$J$1:$K$1,0))
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    04-19-2015
    Location
    United States
    MS-Off Ver
    365
    Posts
    4

    Re: Multiply quantity by a factor based on product name

    Multiply is correct. The product is either a server or motherboard, but there are around 50-100 of them and I need to define each. And some products have a motherboard with 1 or 2 sockets, so need to multiply by 1 or 2 to determine the number of sockets based on the product. Then some of these products come in 4 nodes/boxes in one server so need to multiply by a factor of 4.

    AliGW - I'll look into the formula you created and see how to expand it for all my products. Also, can this be saved on a separate excel tab, so maybe first tab is the conditions then the other tabs are the months and data?

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,608

    Re: Multiply quantity by a factor based on product name

    Yes, the lookup table can be on a separate tab.

    Next time, please provide a workbook so that we don't have to waste time recreating your data! Thanks.

    Glad to have helped.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, if you have not already done so, you may not be aware that you can thank those who have helped you by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.

+ 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. Product Production Schedule Quantity to be aligned Day by Day Based on Multiple Criteria
    By Rajeshkumar R in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-19-2020, 02:17 PM
  2. [SOLVED] Get product code and quantity based on date
    By BRISBANEBOB in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-08-2016, 12:55 AM
  3. Replies: 4
    Last Post: 01-14-2015, 07:46 AM
  4. Itemize Product based on quantity into Multiple Rows
    By sostenes in forum Excel General
    Replies: 2
    Last Post: 12-05-2012, 08:52 PM
  5. Value lookup based on product code and quantity
    By alepoutre in forum Excel General
    Replies: 3
    Last Post: 08-15-2011, 10:45 AM
  6. Replies: 5
    Last Post: 08-10-2011, 05:06 PM
  7. excel multiply by different values based on quantity
    By ronzander1 in forum Excel General
    Replies: 1
    Last Post: 01-11-2006, 04:55 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