search
HomeTopicsexcelSharing practical Excel skills: Eliminating Vlookup 'BUG'

In the previous article "Practical Excel Skills Sharing: Four Rating Formulas", we learned how to write the four rating formulas. Today we will talk about Vlookup and see how to eliminate the "BUG" of Vlookup and make the empty return empty. Let's take a look!

Sharing practical Excel skills: Eliminating Vlookup 'BUG'

Today a student happily told me that he found a major BUG in vlookup. After listening to this, I was stunned, shouldn’t this be right?

After listening to this student’s detailed description, I finally understood. The "BUG" she refers to is that during the operation of the Vlookup function, if the cell containing the return value of the third parameter is empty, the result returned by the function is not empty but 0. As shown in the table below, the student searches for the corresponding salary deduction details based on the employee's job number. When the E4 cell corresponding to the 9003 job number in the source table is empty, the output result in the right table is 0, not empty.

Sharing practical Excel skills: Eliminating Vlookup BUG

#Students said that this situation may lead to statistical errors and cause a lot of trouble. So how can we make a blank cell return a blank cell?

This question is very simple. We only need to judge the operation result of the original vlookup function formula. If the operation result is 0, return a null value. If the operation result is not zero, return the operation result.

First let me show you the results after using the new function formula:

Sharing practical Excel skills: Eliminating Vlookup BUG

We use the function formula: =IF(ISNUMBER(VLOOKUP(I2,A :E,5,0))=FALSE,"",VLOOKUP(I2,A:E,5,0)) completes "air-to-air".

Students expressed confusion after reading the formula. How can they clarify the logical relationship with so many brackets? Besides, there is also an ISNUMBER function that has never been used before!

Don’t be afraid when we encounter a very long function, we can figure it out just by dismantling it step by step.

Now we will break down the function formula for this student.

The first step of dismantling:

VLOOKUP(I2,A:E,5,0) I believe this part of the function formula is often read by us Friends of the excel tutorial article are familiar with it. Its meaning is to return the row number of cell I2 in column A corresponding to the cell content of column 5. “A picture is worth a thousand words.” With a picture, everyone will understand at a glance.

Sharing practical Excel skills: Eliminating Vlookup BUG

Note: 1. The general usage of vlookup is that the search value must be in the first column of the selected area. 2. The third parameter column number cannot be less than 1 and cannot be greater than the total column value of the selected cell area. For example, after selecting the area A:E, there are only 5 columns in the area. If you enter 6, the cell reference error message "#REF" will be returned.

The second step of dismantling:

ISNUMBER(VLOOKUP(I2,A:E,5,0) This part of the function formula looks like Strange, it is actually easier to understand than the first step. It just adds an ISNUMBER function in front. We only need to figure out this function.

The ISNUMBER function can be disassembled into IS NUMBER, so it can be disassembled Everyone should understand that it is actually "whether it is a numerical value". Its function is to determine whether a cell is a numerical value.

Let me give you a simple demonstration below:

Sharing practical Excel skills: Eliminating Vlookup BUG

We can see that in the above example, the E6 cell is blank, and the ISNUMBER judgment result is FALSE. The same is true for the "E4 cell corresponding to the 9003 job number is empty" described at the beginning of the article, ISNUMBER( VLOOKUP(I2,A:E,5,0) determines the salary deduction for job number 9003 as FALSE.

The third step of disassembly:

This part mainly involves a very commonly used function - IF. IF does not need to be explained too much. Its function is very powerful. It is mainly used to determine whether a certain condition is met. If it is met, it returns a value. If it is not met, it returns another value. A value.

Let me give you a simple demonstration below:

Sharing practical Excel skills: Eliminating Vlookup BUG

We can easily understand the above table=IF (F6=FALSE,"",E6)Function formula. Then we can directly use ISNUMBER(VLOOKUP(I2,A:E,5,0) instead of F6, without any characters between the double quotes Indicates blank, VLOOKUP(I2,A:E,5,0) replaces E6. Finally, the function formula that appears at the beginning of our article is formed: =IF(ISNUMBER(VLOOKUP(I2,A :E,5,0))=FALSE,"",VLOOKUP(I2,A:E,5,0))

Related learning recommendations: excel tutorial

The above is the detailed content of Sharing practical Excel skills: Eliminating Vlookup 'BUG'. For more information, please follow other related articles on the PHP Chinese website!

Statement
This article is reproduced at:部落窝教育. If there is any infringement, please contact admin@php.cn delete
一文教会你Excel折叠表格分类汇总功能一文教会你Excel折叠表格分类汇总功能May 12, 2022 am 11:58 AM

本篇文章给大家带来了关于excel的相关知识,其中主要介绍了关于折叠表格的相关问题,就是分类汇总的功能,这样查看数据会非常的方便,下面一起来看一下,希望对大家有帮助。

实用Excel技巧分享:计算年数差、月数差、周数差实用Excel技巧分享:计算年数差、月数差、周数差Apr 22, 2022 am 09:56 AM

在之前的文章《实用Excel技巧分享:利用 数据透视表 来汇总业绩》中,我们学习了下Excel数据透视表,了解了利用数据透视表来汇总业绩的方法。而今天我们来聊聊怎么计算时间差(年数差、月数差、周数差),希望对大家有所帮助!

实例总结Excel中AGGREGATE函数的八个用法实例总结Excel中AGGREGATE函数的八个用法May 17, 2022 am 11:37 AM

本篇文章给大家带来了关于excel的相关知识,其中主要介绍了关于AGGREGATE函数的相关内容,该函数用法与SUBTOTAL函数类似,但在功能上比SUBTOTAL函数更加强大,下面一起来看一下,希望对大家有帮助。

Word与Excel联动:表格借用Word进行分栏打印!Word与Excel联动:表格借用Word进行分栏打印!May 07, 2022 am 10:28 AM

在之前的文章《实用Word技巧分享:聊聊你没用过的“行号”功能》中,我们了解了Word中你肯定没用过的"行号”功能。今天继续实用Word技巧分享,看看Excel表格怎么借用Word进行分栏打印,快来收藏使用吧!

实例详解利用Excel制作倒计时牌实例详解利用Excel制作倒计时牌May 16, 2022 am 11:53 AM

本篇文章给大家带来了关于excel的相关知识,其中主要介绍了关于zenmm制作倒计时牌的相关内容,使用Excel中的日期函数结合按指定时间刷新的VBA代码,即可制作出倒计时牌,下面一起来看一下,希望对大家有帮助。

实用Excel技巧分享:合并单元格后实现筛选功能实用Excel技巧分享:合并单元格后实现筛选功能May 11, 2022 am 10:22 AM

在之前的文章《实用Excel技巧分享:原来“定位功能”这么有用!》中,我们了解了定位功能的妙用。而今天我们聊聊合并后的单元格如何实现筛选功能,分享一种复制粘贴和方法解决这个问题,另外还会给大家分享一种合并单元格的不错的替代方式。

Excel怎么查找总和为某个值的组合Excel怎么查找总和为某个值的组合May 18, 2022 am 11:25 AM

本篇文章给大家带来了关于excel的相关知识,其中主要介绍了关于如何使用函数寻找总和为某个值的组合的问题,下面一起来看一下,希望对大家有帮助。

图文详解Excel中XLOOKUP函数典型用法整理图文详解Excel中XLOOKUP函数典型用法整理Apr 21, 2022 am 11:46 AM

本篇文章给大家带来了关于Excel的相关知识,其中主要介绍了关于XLOOKUP函数的相关知识,包括了常规查询、逆向查询、返回多列、自动除错以及近似查找等内容,下面一起来看一下,希望对大家有帮助。

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

Hot Tools

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use