IFERROR、INDEX、MATCH 返回零而不是空白 [英] IFERROR, INDEX, MATCH returning zeros instead of blanks

查看:115
本文介绍了IFERROR、INDEX、MATCH 返回零而不是空白的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用以下公式:

=IFERROR(INDEX('Cleaned Post'!W:W,MATCH(Combined!$C2,'Cleaned Post'!$C:$C,0))," ")

这个公式工作得很好,除了空白单元格,它返回0".我希望空白单元格返回为空白.

This formula is working beautifully, except that for blank cells, it's returning "0". I would like blank cells to be return as blank.

具体来说,这就是我所拥有的

Specifically, this is what I have

第 1 页(标题为 Cleaned Post)

Sheet 1 (entitled Cleaned Post)

Name        Email      Age Gender   Task #1
Andrew 888@gmail.com   18    1        80
Jason  687@gmail.com   20    1        95
Judy   432@gmail.com   18    2        __
Jack   236@gmail.com   24    1        65

表 2(标题为合并)- 我得到了什么

Sheet 2 (entitled Combined) - What I'm getting

    Email      Task#1
888@gmail.com   80
687@gmail.com   95
432@gmail.com    0
236@gmail.com   65

表 2(标题为合并)- 我想要的

Sheet 2 (entitled Combined) - What I want

    Email     Task#1
888@gmail.com   80
687@gmail.com   95
432@gmail.com   __
236@gmail.com   65

我需要做什么来调整这个公式?

What do I need to do to adjust this formula?

推荐答案

你的公式返回什么样的值?如果它们是文本值,则将空字符串"连接到您的 INDEX/MATCH 公式就足够了,如下所示:

What sort of values is your formula returning? If they are text values it's sufficient to concatenate a "null string" to your INDEX/MATCH formula like this:

=IFERROR(INDEX('Cleaned Post'!W:W,MATCH(Combined!$C2,'Cleaned Post'!$C:$C,0))&"","")

这也适用于数字,只是它会将它们转换为文本,因此如果您不想要,可以尝试此版本:

That also works for numbers except it will convert them to text so if you don't want that you can try this version:

=IFERROR(IF(INDEX('Cleaned Post'!W:W,MATCH(Combined!$C2,'Cleaned Post'!$C:$C,0))="","",INDEX('Cleaned Post'!W:W,MATCH(Combined!$C2,'Cleaned Post'!$C:$C,0))),"")

这篇关于IFERROR、INDEX、MATCH 返回零而不是空白的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆