Forum Discussion

Vera0508's avatar
Vera0508
Copper Contributor
Jan 20, 2023

Give price for product based on chosen product

Hey Community! I have been trying to find a formula but so far it was only try and error. 🙂 Basically, the idea is simple: I have different products (1-20) in row 1 and those might have, if the ...
  • mathetes's avatar
    mathetes
    Jan 20, 2023

    Vera0508 

     

    I'm sorry if my response seemed "mean," for it certainly wasn't my intent nor my mindset at all when I was writing; the reason I gave you those links to YouTube was that it's often easier for people to learn from those videos than from a verbal description alone. I think you put your finger on what's confusing in your design in your first post, when you said, and I'm quoting, "In total I have the same table five times." But that's also confusing because your image shows eight, not five, similar arrays of information.

     

    I will also attach a basic table in which I'll reorganize some of the data from your image to start populating it.

    The first concept to implement, though, is to

    • take your row headings and make them column headings, and then just have one row per response. (the way yours currently is organized, you are, in effect, creating multiple tables rather than just one. Doing that--multiple tables--will greatly interfere with those lookup and index functions that you were trying out)
    • then you'll have to modify some of your data to accomplish this: be consistent with the content in any one column. You switch back and forth between the unit being kg and bag, sometimes specifying the size of the bag in kg terms, and then the various Quantity columns themselves go back and forth between bag and kg. Granted, that may be the way your survey results came back, but for a table to be useful, you will want consistency for any given aspect of the product (i.e., any given column)

    That said, there may be other design issues, depending on what you're trying to do WITH the table once it's a single table. You will find that VLOOKUP (rather than HLOOKUP) can work, because it can go through the entire table looking for a match. Same with INDEX and MATCH. However, they all tend to work better when there's at least one column where each entry is unique. (Having, for example, several rows where Product Name is the same, gets in the way.)

     

    But all of these other fine points of table design really depend on what you want to accomplish with your table.  And that's why I referred you to those YouTube links. So please, take a look at the attached start--that's all it is--at a table, but also go look at those YouTube links to determine more fully what it is that a table can do for you in your setting, how it could be improved in design. And then come back and ask questions. 

     

Resources