+ Reply to Thread
Results 1 to 4 of 4

Find Primary Supplier for Each Product

  1. #1
    Registered User
    Join Date
    09-13-2019
    Location
    Buda, TX
    MS-Off Ver
    MS Office 2016
    Posts
    33

    Find Primary Supplier for Each Product

    Hello, this is a follow to another question I posted here, the link will be at the bottom. I can't seem to figure out this logic, and sanity is beginning to slip.

    I'm trying to use a Store's total Inventory to Identify the Primary Supplier for each individual product. Supplier A sells Tomatoes and Green Peppers; Supplier B Tomatoes, Cheese, and Dough; and Supplier C sells Cheese and Dough.

    On a scale of 1 (low stock priority) to 5 (Never stocked out), each Store and Supplier has decided the value of each product to themselves. Supplier C claims they will never run out of Cheese or Dough, while Supplier A will occasionally have Green Peppers, but will never carry Dough.

    Most of Pizza Joint's inventory (48.1%) comes from Supplier B, so for every product Supplier B sells, their product value should be reflected in column C. However, since Supplier B does not sell Green Peppers, I want to look at the next highest supplier, but only if they sell the product. In this case, it is Supplier A. The product values in Column C should be Tomato:3, Cheese:1, Dough:3, Green Peppers: 2.

    Here's the twist:
    If Supplier A should increase their shipments to 41.40%, while Supplier B decreases to Pizza Joint to 28.00%, Supplier A will become the primary supplier for Tomatoes and Green Peppers, while Supplier C becomes the primary supplier for Cheese and Dough. The product values in Column C should be Tomato:4, Cheese:5, Dough:5, Green Peppers: 2.

    What is the formula to put in Column C? I feel like I've got all the pieces, but get them together.

    https://www.excelforum.com/excel-for...ml#post5628255
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,540

    Re: Find Primary Supplier for Each Product

    This may be an option:
    1. Paste, transpose, the data from the Supplier sheet into J1:Q3 of the Situation #1 sheet.
    2. Populate F3:H3 using: =RANK.EQ(F3,$F3:$H3)
    3. Populate J4:Q4 using: =INDEX($F4:$H4,MATCH(K1,$F2:$H2,0))
    4. The formula for the product values is:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Test by changing the values in F3:H3 to match those on the Situation #2 sheet.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  3. #3
    Registered User
    Join Date
    09-13-2019
    Location
    Buda, TX
    MS-Off Ver
    MS Office 2016
    Posts
    33

    Re: Find Primary Supplier for Each Product

    Solution Verified

    I had to modify your solution to use the Supplier Tab, because my situation has too many combinations for your suggestion to be practical. Attached is the file with my modified formula alongside your original formula.

    However, your formula works, thank you! Will you provide a more detailed explanation of what your formula is doing, or share some explanatory literature?

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,540

    Re: Find Primary Supplier for Each Product

    The formula in D4:D7 on the Situation #1 sheet works as follows:
    1. INDEX(K$3:Q$3,AGGREGATE(15,6,(COLUMN(K$3:Q$3)-COLUMN(J$3))/(K$2:Q$2=A4)/(K$4:Q$4=1),1)) will return the values from cells K3:Q3 where K2:Q2 are the same as that in the corresponding cell in column A and K4:Q4 are 1
    2. However if that part produces and error then the second IFERROR throws the formula to
    3. INDEX(K$3:Q$3,AGGREGATE(15,6,(COLUMN(K$3:Q$3)-COLUMN(J$3))/(K$2:Q$2=A4)/(K$4:Q$4=2),1)) will return the values from cells K3:Q3 where K2:Q2 are the same as that in the corresponding cell in column A and K4:Q4 are 2
    4. However if that part produces and error then the first IFERROR throws the formula to
    5. INDEX(K$3:Q$3,AGGREGATE(15,6,(COLUMN(K$3:Q$3)-COLUMN(J$3))/(K$2:Q$2=A4)/(K$4:Q$4=3),1)) will return the values from cells K3:Q3 where K2:Q2 are the same as that in the corresponding cell in column A and K4:Q4 are 3
    It may also aid in understanding to select cell D7 on the Situation #1 sheet and utilize the Evaluate Formula feature (Formulas tab).
    Let us know if you have any questions.

+ 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. Formula to compare 2 lists to find primary location
    By denny112 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-24-2020, 04:04 PM
  2. [SOLVED] Formula to return Yes if the Supplier is Xomo and if the Supplier Bisum job title
    By lachonda1 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 02-06-2020, 06:43 PM
  3. Replies: 3
    Last Post: 01-22-2018, 11:57 AM
  4. Replies: 6
    Last Post: 02-21-2016, 04:15 AM
  5. [SOLVED] Find the cheapest supplier name
    By makinmomb in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-15-2015, 12:52 AM
  6. [SOLVED] Find Product Details in Another Sheet based on Product ID and Copy some Fields From there
    By kevalkothari in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-29-2012, 10:43 AM
  7. [SOLVED] Need Function that will find ordered product, and display the product code in a 2nd workbk
    By rollerden in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-21-2012, 08:52 AM

Tags for this Thread

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