Vlookup表格将唯一的单元格ID转换为多个成分

huangapple go评论57阅读模式
英文:

Vlookup tables to convert unique cell ID to multiple ingredients

问题

我在想是否有人可以帮助我解决Excel的问题。
我已经导入了一个包含一些业务订单的csv文件,每一行都是不同的订单。
在这些订单中,有一个包含特定产品ID的单元格,这些ID是唯一的。
例如,BYO4/CHI将是一个带有鸡肉的BYO捆绑包,BYO4/CHI/GUAC将是带有鸡肉和鳄梨酱的BYO捆绑包。
我的最终目标是创建公式,可以读取这个“唯一ID列”,将标签与查找表进行比较,并将所需的配料数量添加到包含所有可能配料的列表中。

理想的流程图如下所示:
读取特定订单的唯一ID单元格(例如“BYO4/CHI”)
BYO4/CHI需要4只鸡肉,3只辣椒,2颗洋葱(可能以某种方式结构化成查找表?)
配料列表旁边的鸡肉、辣椒和洋葱的值会相应更新(4、3、2)
这将重复进行,直到特定列中的每个唯一ID,然后计算每种配料的总量。

我不知道如何格式化查找表以允许多个值的更新,或者这是否可能!

提前感谢您,
Benn

我尝试过使用查找表,以及使用它来比较唯一ID,但我还没有弄清楚如何将值添加到特定的配料中,以及如何处理一个代码的多个配料。

英文:

I'm wondering if somebody could help me with a problem I'm having with Excel.
I have imported a csv file with some business orders, and each row is a different order.
Within these orders, there is a cell with a certain product ID, and these are unique.
For example, BYO4/CHI would be a BYO bundle with Chicken, BYO4/CHI/GUAC would be BYO bundle with Chicken and Guacomole.
My ultimate goal is to have formulas that will read this 'Unique ID column', compare the tag with a lookup table and add the required ingredient count to a list with all possible ingredients.

An ideal flowchart would look like this:
Read unique ID cell for a particular order (say, 'BYO4/CHI')
BYO4/CHI requires 4 chicken, 3 pepper, 2 onion (somehow structured into a lookup table perhaps?)
The values next to the ingredients list for Chicken, Pepper and Onion would update accordingly (4, 3, 2)
This is repeated for every unique ID down the particular column, and a total amount of each ingredient is calculated.

I'm having trouble figuring out how I would format the lookup table to allow for multiple value updates, or if this is even possible at all!

Thanks in advance,
Benn

I have tried using lookup tables, and using this to compare unique IDs, but I haven't figured out how this could then add values to particular ingredients, and how to do multiple ingredients for one code.

答案1

得分: 1

以下是一个使用VLOOKUP来构建的简单结构方式。但根据您拥有的成分数量,这可能不太实际。另一位用户建议包含一些示例数据会很有帮助。

Vlookup表格将唯一的单元格ID转换为多个成分

英文:

Here is a simple way to structure it using just VLOOKUP. But depending on how many ingredients you have it might not be practical. The other user's suggestion to include some sample data would be helpful.

Vlookup表格将唯一的单元格ID转换为多个成分

huangapple
  • 本文由 发表于 2023年6月1日 00:18:54
  • 转载请务必保留本文链接:https://go.coder-hub.com/76375520.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定