vlookup match

电子表格/索引匹配 (SPREADSHEETS / INDEX-MATCH)

In a previous article, we discussed about how and when to use VLOOKUP functions and what are the issues that we might face while using them. This article, on the other hand, will take you to a journey to understand an upgraded version of VLOOKUP. This upgrade is a combination of two functions in spreadsheets — INDEX and MATCH. Let us try and understand the working of INDEX-MATCH through the following example.

在上一篇文章中 ,我们讨论了如何以及何时使用VLOOKUP函数,以及在使用它们时可能遇到的问题。 另一方面,本文将带您了解VLOOKUP升级版本 。 此升级是电子表格中两个功能的组合INDEX和MATCH 。 让我们尝试通过以下示例来理解INDEX-MATCH的工作。

了解数据 (Understanding the Data)

As always, let us take an example from our favorite data source — Kaggle. The following screenshot is a small subset of the Netflix data which consists of TV shows and movies available on Netflix as of 2019.

与往常一样,让我们​​以我们最喜欢的数据源Kaggle为例。 以下屏幕截图是Netflix数据的一小部分,其中包括截至2019年Netflix上可用的电视节目和电影。

Netflix Data for INDEX-MATCH demonstration
用于INDEX-MATCH演示的Netflix数据

This dataset consists of different shows and movies along with their unique show_id, country we are considering, date when the show was added and the year when the entity was released. It also contains rating of the show/movie, duration and title of the content piece.

该数据集包含不同的节目和电影,以及它们唯一的show_id ,我们正在考虑的country ,添加节目的date和发布实体的year 。 它还包含内容的放映/电影ratingdurationtitle

Consider now that we want to create a search method where the user can select a title and we display information to the user regarding that title. This search method would look something like this:

现在考虑,我们想创建一种搜索方法,用户可以在其中选择title然后向用户显示有关该标题的信息。 此搜索方法如下所示:

Example of how the search method will look like
搜索方法外观示例

The user can input any title in the above example and we will try and find the type and rating of the title mentioned from the database. One of the simpler solutions to this is through VLOOKUP. We can easily find the rating of the title through it. Although, we would need to change the structure of the table to get the type of the title since VLOOKUP can only look to the right of the search value. Let’s see how can INDEX and MATCH formulas help us in solving this problem.

用户可以在上面的示例中输入任何title ,我们将尝试从数据库中查找提到的标题的typerating 。 一种更简单的解决方案是通过VLOOKUP。 我们可以通过它轻松找到标题的等级。 虽然,我们将需要更改的结构以获取标题的类型,因为VLOOKUP 只能在搜索值的右侧查找。 让我们看看INDEX和MATCH公式如何帮助我们解决此问题。

什么是索引? (What is INDEX?)

INDEX formula in spreadsheets look something like this:

电子表格中的INDEX公式如下所示:

INDEX formula in Google Spreadsheets
Google Spreadsheets中的INDEX公式

INDEX helps us in finding the content of the cell. It takes 3 inputs.

INDEX帮助我们找到单元格的内容。 它需要3个输入。

  • Row: The number of rows from the beginning of the reference table where the value lies. This is an optional value. If no value is supplied, it will take the first row as the value.

    :从值所在的引用表的开头开始的行数。 这是一个可选值。 如果未提供任何值,则它将第一行作为值。

  • Column: The number of columns from the beginning of the reference table where the value lies. This is an optional value. If no value is supplied, it will take the first column as the value.

    :从值所在的参考表开始的列数。 这是一个可选值。 如果未提供任何值,则它将第一列作为值。

To find the type of the title ‘Carrie Pilby’ in our table, we apply the following formula:

要在我们的表格中找到标题“ Carrie Pilby”的类型,我们使用以下公式:

=INDEX(A1:H23,12,2)

We select the complete table as reference, we find that this movie title is in the 12th row and we know that the type of the title is stored in 2nd column of the reference table. This will give the result as ‘Movie’ which is absolutely correct!

我们选择完整的表作为参考 ,我们发现该电影标题位于第12行,并且知道标题的类型存储在参考表的第二列中。 这将给出绝对正确的“电影”结果!

But did you notice any problems with this? We actually had to count the row number and the column number to get 12 and 2 as the parameters in the formula. This isn’t easy, is it? Let’s find out if there is any other way in the world which can help us in easing this process.

但是您注意到这个有什么问题吗? 实际上,我们必须对行号和列号进行计数,以获得12和2作为公式中的参数。 这不容易,是吗? 让我们找出世界上是否还有其他方法可以帮助我们简化这一过程。

什么是MATCH? (What is MATCH?)

MATCH formula in spreadsheets look something like this:

电子表格中的MATCH公式如下所示:

MATCH formula in Google Spreadsheets
Google Spreadsheets中的MATCH公式

MATCH helps us in finding the relative position of the content in our table. It takes 3 inputs.

MATCH帮助我们找到表中内容的相对位置。 它需要3个输入。

  • Search Key: The value that we want to find.

    搜索键 :我们要查找的值。

  • Range: The row/column in which the value is situated. Note that range can only take a row or a column, but not both.

    范围 :值所在的行/列。 请注意,范围只能包含一行或一列,但不能同时包含两者。

  • Search Type: For all practical purpose, we set this value as zero. This indicates that we are finding the exact value. This is an optional term which takes the value as 1 by default.

    搜索类型 :出于所有实际目的, 我们将此值设置为零 。 这表明我们正在寻找确切的值。 这是一个可选术语,默认情况下将值设为1。

MATCH essentially gives us the row number or the column number of where the search term lies. Isn’t this the missing part of the INDEX puzzle we encountered earlier? We needed an easier way to find the row and column number of the search item, rather than counting it manually. And MATCH gives you exactly that!

MATCH本质上为我们提供了搜索词所在的行号或列号。 这不是我们之前遇到的INDEX难题缺失部分吗? 我们需要一种更简单的方法来查找搜索项的行号和列号,而不是手动对其进行计数。 而MATCH正是为您提供!

神圣的INDEX-MATCH婚姻 (The holy INDEX-MATCH matrimony)

The above explanation now allows us to join the INDEX and MATCH formulas together and get the information we require with the minimum amount of hassle. Here is how a general INDEX-MATCH formula would look like:

上面的解释现在使我们可以将INDEX和MATCH公式结合在一起,并以最少的麻烦获得所需的信息。 通用INDEX-MATCH公式如下所示:

=INDEX(reference, MATCH(search_key, row, 0), MATCH(search_key, column, 0))

In the above formula, we provide a reference table to the INDEX, which is basically the data table where all the information is. Next, the first MATCH formula provides the row index of the search term and the second MATCH provides the column index of the search term. Finally, the combination of these two will provide the row and column index to the INDEX formula and we’ll get our desired result! Let’s try it out in our Netflix example.

在上面的公式中,我们提供了INDEX参考表 ,它基本上是所有信息所在的数据表。 接下来,第一个MATCH公式提供搜索项行索引, 第二个 MATCH公式提供搜索项列索引 。 最后,这两者的结合将为INDEX公式提供行索引和列索引,我们将获得理想的结果! 让我们在Netflix示例中尝试一下。

INDEX-MATCH for finding content type
INDEX-MATCH用于查找内容类型

The above formula selects the entire table in first parameter of INDEX. Then it searches for the movie title mentioned in K1 through MATCH formula in the entire row of content titles, which is C1:C23. This will return whatever row number the title ‘Carrie Pilby’ is in. In the second MATCH, it searches for J2, which is the parameter that we want to find, in this case Type. This will return whatever column the column name ‘Type’ is in. And together it will provide the correct result i.e. Movie.

上面的公式在INDEX的第一个参数中选择整个表。 然后,它通过MATCH公式在整个内容标题行(即C1:C23)中搜索K1中提到的电影标题。 这将返回标题为“ Carrie Pilby”所在的行号。在第二个MATCH中,它将搜索J2,这是我们要查找的参数,在本例中为Type。 这将返回列名“ Type”所在的任何列。并且一起提供正确的结果,即Movie。

Similarly, here is the formula for how to match rating in the table for the given content title.

同样,这是有关如何匹配表中给定内容标题的评级的公式。

INDEX-MATCH for finding content rating
INDEX-MATCH用于查找内容分级

与VLOOKUP比较 (Comparing with VLOOKUP)

Often there will be comparisons on which formula to use to find the values of a given content. Although VLOOKUP is simpler to understand and provides an easy application, the INDEX-MATCH combination is a powerful match which provides the following advantages:

通常会比较使用哪个公式来查找给定内容的值。 尽管VLOOKUP易于理解并且易于使用,但INDEX-MATCH组合是功能强大的匹配项,具有以下优点:

  1. You can use INDEX-MATCH to find a value against multiple criteria. In the above examples, we found Type and Rating with content name criteria and parameter criteria. This wouldn’t have been easy to achieve in VLOOKUP.

    您可以使用INDEX-MATCH 根据多个条件查找值 。 在以上示例中,我们找到了带有内容名称标准和参数标准的TypeRating 。 这在VLOOKUP中并非容易实现。

  2. VLOOKUP finds a match on the left and returns any value to the right of the search item. On the other hand, INDEX-MATCH can look both ways. In the above example, type was on the left of title and rating on the right, still it managed to find both the results correctly.

    VLOOKUP在左侧找到一个匹配项,并在搜索项的右侧返回任何值。 另一方面, INDEX-MATCH可以双向查看 。 在上面的示例中,类型位于标题的左侧,评级位于右侧,但仍设法正确找到了两个结果。

Understanding INDEX-MATCH adds an extremely versatile tool in your spreadsheet armory. INDEX-MATCH along with the knowledge of Pivot Tables can really help you to improve your analytical skills. Let me know in comments if this was a helpful piece of content!

了解INDEX-MATCH可以在电子表格库中添加一个极其通用的工具。 INDEX-MATCH以及数据透视表的知识可以真正帮助您提高分析技能。 在评论中让我知道这是否是有用的内容!

翻译自: https://towardsdatascience.com/index-match-an-upgrade-on-vlookup-functions-320e43253d15

vlookup match


http://www.taodudu.cc/news/show-997346.html

相关文章:

  • flask redis_在Flask应用程序中将Redis队列用于异步任务
  • 前馈神经网络中的前馈_前馈神经网络在基于趋势的交易中的有效性(1)
  • hadoop将消亡_数据科学家:适应还是消亡!
  • 数据科学领域有哪些技术_领域知识在数据科学中到底有多重要?
  • 初创公司怎么做销售数据分析_为什么您的初创企业需要数据科学来解决这一危机...
  • r软件时间序列分析论文_高度比较的时间序列分析-一篇论文评论
  • selenium抓取_使用Selenium的网络抓取电子商务网站
  • 裁判打分_内在的裁判偏见
  • 从Jupyter Notebook切换到脚本的5个理由
  • ip登录打印机怎么打印_不要打印,登录。
  • 机器学习模型 非线性模型_调试机器学习模型的终极指南
  • 您的第一个简单的机器学习项目
  • 鸽子为什么喜欢盘旋_如何为鸽子回避系统设置数据收集
  • 追求卓越追求完美规范学习_追求新的黄金比例
  • 周末想找个地方敲代码_观看我们的代码游戏,全周末直播
  • javascript 开发_25个新JavaScript开发人员的免费资源
  • 感谢您的提问_感谢您的反馈,我们正在改进的5种方法
  • 堆叠自编码器中的微调解释_25种深刻漫画中的编码解释
  • Free Code Camp现在有本地组
  • 递归javascript_JavaScript中的递归
  • 判断一个指针有没有free_Free Code Camp的每个人现在都有一个档案袋
  • 使您的Java代码闻起来很新鲜
  • Stack Overflow 2016年对50,000名开发人员进行的调查得出的见解
  • 编程程序的名称要记住吗_学习编程时要记住的5件事
  • 如何在开源社区贡献代码_如何在15分钟内从浏览器获得您的第一个开源贡献
  • utf-8转换gbk代码_将代码转换为现金-如何以Web开发人员的身份赚钱并讲述故事。...
  • 有没有编码的知识图谱_没有人告诉您关于学习编码的知识-以及为什么如此困难...
  • 你鼓舞了我是世界杯主题曲吗_选择方法和鼓舞人心的网站列表
  • reddit_我在3天内疯狂地审查了Reddit上的50个投资组合,从中学到了什么。
  • 使用Express和MongoDB构建简单的CRUD应用程序

vlookup match_INDEX-MATCH — VLOOKUP功能的升级相关推荐

  1. Excel函数组合(一) - VLOOKUP和MATCH组合

    大家好,我是永不止步的老牛. Excel有很多功能强大的函数,如果函数间能组合使用,那就是强强联手,今天我们先看第1组强强联手"VLOOKUP"和"MATCH" ...

  2. Excel常用查找函数,vlookup、match+index/offset

    Excel常用查找函数 1. vlookup vlookup的4个参数如下: =VLOOKUP ([要查找的项].[要查找位置].[包含要返回的值的单元格区域中的列号].[返回近似或精确匹配 - 指示 ...

  3. Windows 10新版可以更新了!这些新功能值得升级

    Windows 10新版可以更新了!这些新功能值得升级 今晨,微软除了推送Windows 10周年更新/秋季更新的正式版Build,Insider快速会员也收获Build 15058. 因为昨日有消息 ...

  4. 华米Amazfit跃我GTR 3 Pro深度体验:功能全面升级,时尚更实惠

    作为一个运动和数码爱好者,笔者经常会关注哪个厂商又发布了的新款智能手表.此前,每次看到新闻出现"水果"公司专利技术曝光,下代产品或将支持血压监测功能时都会期待不已,但令人遗憾的是, ...

  5. ethos最新发布-软件升级为克莱默14.7 功能重大升级

    ethos最新发布-软件升级为克莱默14.7 功能重大升级 简单 本系统 是基于原版linux系统 开发的专业用于挖掘 ETH(以太坊)以及其他 定制币种.最少的资源消耗,让您矿机以最低硬件要求安全平 ...

  6. 阿里云PAI-Diffusion功能再升级,全链路支持模型调优,平均推理速度提升75%以上

    导读 随着Stable Diffusion模型在AI圈的爆火,AI生成内容(AI Generated Content,AIGC)的应用呈现出井喷式的增长趋势.其中,文图生成(Text-to-image ...

  7. PPTV多屏互动功能再升级 实现PC移动端双向互动

    2013年08月08日 15:54:55 | 责任编辑: 刘芳宇 | 来源: 流媒体网    ♦ 关键词 ⇒   互动功能  PC  视频  手机   互联网技术的发展带领用户进入到信息爆炸的时代,海 ...

  8. 华为新手表鸿蒙,华为手表Watch 3即将发布:搭载鸿蒙系统,健康功能大升级

    相信很多喜欢使用智能手表的朋友都非常期待华为Watch 3的发布,就在今天(5月27日)华为官方微博发布官宣海报::#万物皆鸿蒙# 智慧想象,一表万象.#华为WATCH#3,旗舰归来. 随后,华为消费 ...

  9. 鸿蒙系统 智能手表,华为手表Watch 3即将发布:搭载鸿蒙系统,健康功能大升级...

    相信很多喜欢使用智能手表的朋友都非常期待华为Watch 3的发布,就在今天(5月27日)华为官方微博发布官宣海报::#万物皆鸿蒙# 智慧想象,一表万象.#华为WATCH#3,旗舰归来. 随后,华为消费 ...

  10. 一箭三雕,赚钱赚人气赚粉丝!粉丝圈红包功能全面升级

    社群运营久了,会不会发现这样的问题: 用户活跃度持续降低, 以往的激励机制对用户毫无新鲜感, 粉丝数增长缓慢, 找不到合适的变现机会 -- 有没有一种方式,能够既涨粉.提高用户粘性,还能轻松变现? 粉 ...

最新文章

  1. 文件标识符必须为双精度类型的整数值标量_【翻译】VTK官方文档 - vtk文件格式
  2. LeetCode-35. Search Insert Position
  3. SQL Server中把查询出来的结果重新编号作为一列
  4. php多个表中查找数据_Excel实战技巧74: 在工作表中创建搜索框来查找数据
  5. 《设计模式系列》---克隆模式
  6. nginx反代web页面没有正常显示_web漏洞-SSI注入漏洞深入详解
  7. 微pe不识别nvme固态硬盘_微pe工具箱2.0下载|微PE2.0支持注入NVMe固态硬盘M2SSD驱动版 下载_当游网...
  8. SourceOffSite Server和Visual SourceSafe 6.0d锁死问题的解决
  9. 分享两个开源的成品项目,一个视频播放器,一个音乐播放器!
  10. MSSQL·手动安装机器学习相关CAB文件
  11. bzoj 2101: [Usaco2010 Dec]Treasure Chest 藏宝箱【区间dp】
  12. 运维:你们 JAVA 服务怎么又又又又出问题了,内存降不下来。
  13. 与师生谈人工智能3:精确定义之病
  14. Java实习生常规技术面试题每日十题Java基础(一)
  15. Jenkins的详细安装及使用
  16. 怎么在cmd 窗口 远程连接服务器
  17. (一)ArcGIS Server之发布动态地图服务
  18. Web的组成架构模型
  19. vue简单实现多功能弹幕(比上一个好)
  20. img标签元素随父div等比例缩放

热门文章

  1. 计算机辅助外文文献,计算机辅助夹具设计外文文献.pdf
  2. MySQL字段拼接Concat
  3. 中国石油大学(华东)暑期集训--二进制(BZOJ5294)【线段树】
  4. Python -- xlrd,xlwt,xlutils 读写同一个Excel
  5. mac vagrant 虚拟机nfs挂载点
  6. 学习笔记找到多个具有相同 ID“_header”的控件,FindControl 要求控件具有唯一的 ID....
  7. zookeeper 应用开发
  8. 如何安装pylab:python如何导入matplotlib模块
  9. 机器学习模型中step与epoch,batch_size之间的关系
  10. RUNOOB python练习题29