[英]Excel formula to match store category name & ID
I have a Magento store which contains over 2500 categories. 我有一个Magento商店,其中包含2500多个类别。 I have so many categories because I have assigned each unique product its own category. 我有很多类别,因为我为每个独特的产品都分配了自己的类别。 Each unique product requires its own category because there will be many identical product listings from separate suppliers 每个独特的产品都有其自己的类别,因为会有来自不同供应商的许多相同产品清单
Please view the below url for clarity: http://www.efficienttrade.co.nz/products/full-product-list/p-products/potassium-nitrate.html 为了清楚起见,请查看以下网址: http : //www.efficienttrade.co.nz/products/full-product-list/p-products/potassium-nitrate.html
The above url shows how I have created a category named "Potassium nitrate", I have then assigned identical products to that category. 上面的网址显示了如何创建一个名为“硝酸钾”的类别,然后将相同的产品分配给该类别。
I have a csv excel sheet containing all my unique chemical compounds which are displayed on my website. 我有一个csv excel表格,其中包含我的网站上显示的所有独特的化学化合物。 Within that sheet I have also included all my store category names & ID's. 在该表中,我还包括了我所有的商店类别名称和ID。
I am requiring a simple excel formula that will go through each product, comparing its name to the category name (the names in both areas should be identical), if a match is found, the category ID for that product will be inserted into the "Category ID" column on the product sheet. 我需要一个简单的excel公式,该公式将遍历每个产品,将其名称与类别名称进行比较(两个区域中的名称应相同),如果找到匹配项,则该产品的类别ID将插入“产品表上的“类别ID”列。 I would also like to assign 3 categories to each product by default (products, full product list & all products) categories. 我还想为每个产品默认分配3个类别(产品,完整产品列表和所有产品)类别。
Here's my excel sheet download page. 这是我的Excel工作表下载页面。 Please take a look & see if you can help me out with the matching. 请查看并查看是否可以帮助我进行匹配。
http://www.efficienttrade.co.nz/Shared/matchingCategories.xlsx http://www.efficienttrade.co.nz/Shared/matchingCategories.xlsx
If you want something like below 如果您想要以下内容
Product Name category_ids
Abietic acid 332
Acacia 328
write below statement in column B at B2 location 在B2位置的B列中写以下语句
=VLOOKUP(A2,$C$2:$D$2640,2,FALSE)
Apply this for all cells... 将其应用于所有单元格...
Note 注意
Wherever you find #N/A
, it means that respective Product Name
is not present in Store Category Name
. 无论在哪里找到#N/A
,都意味着“ Store Category Name
没有相应的“ Product Name
Store Category Name
。 Hope it clears... 希望能清除...
If you want to print 3294297
instead of #N/A
use below 如果要打印3294297
而不是3294297
#N/A
在下面使用
=IF(ISNA(VLOOKUP(A2,$C$2:$D$2640,2,FALSE)),3294297,VLOOKUP(A2,$C$2:$D$2640,2,FALSE))
If you want to print No Match
instead of #N/A
use below 如果要打印No Match
而不是#N/A
在下面使用
=IF(ISNA(VLOOKUP(A2,$C$2:$D$2640,2,FALSE)),"No Match",VLOOKUP(A2,$C$2:$D$2640,2,FALSE))
Try this formula on Column B 在B列上尝试使用此公式
=LOOKUP(A2,C:C,D:D)
Above formula requires columns in ascending order. 上面的公式要求列按升序排列。
=VLOOKUP(A2,C:D,2,FALSE)
Product Name category_ids
Abietic acid 332
Acacia 328
Acenaphthene 329
Acenaphthoquinone 330
Acenaphthylene 671
Acephate 672
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.