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

查看:999
本文介绍了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张(标题为清理后的帖子")

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天全站免登陆