MS Excel中:" MATCH()"没有找到包含文本单元格,如果查找数组太大 [英] MS Excel: "MATCH()" does not find cells containing text if lookup array is too large

查看:281
本文介绍了MS Excel中:" MATCH()"没有找到包含文本单元格,如果查找数组太大的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建一个庞大而复杂的日程安排,我想要一个视图,显示时间表不如一天时间网格,另一个则允许从字母列表查找按名称扬声器。我已经发布一个简单的例子在这里:

I am creating a large and complicated schedule, and I want one view which shows the schedule as a day-time grid, and another which allows one to look up a speaker by name from an alphabetical list. I have posted a simplified example here:

http://www.calpoly.edu/~epearse/excel-issue.png

在字母列表,日期和时间应该使用MATCH函数填充。只是作为一个例子,我手动输入我想有发生琼斯的东西。

In the alphabetical list, the day and time should be populated by a function using MATCH. Just as an example, I manually typed what I would like to have happen for Jones.

我不能让MATCH()在时间表正确定位演讲嘉宾的名字。有没有隐藏人物:注意到,在小区D15,Excel中正确地认识到,G2和C7是相同的。

I cannot get MATCH() to locate the speaker's name in the timetable correctly. There are no hidden characters: notice that in cell D15, Excel correctly recognizes that G2 and C7 are identical.

下面是如果我把各种code H2中会发生什么:

Here is what happens if I put various code in H2:


  • = MATCH(G2,$ A $ 1:$ D $ 9)的结果#N / A

  • = MATCH(G2,$ C $ 2:$ C $ 9)的结果#N / A

  • = MATCH:(!正确)(G2,$ B $ 7 $ D $ 7)导致2

  • = MATCH(G2,$ A $ 7:$ D $ 7)结果#N / A

我想是把= MATCH(G2,$ A $ 1:$ D $ 9)成H2和然后填充细胞至H25,并有Excel中指示其中出现相邻名称一天的列数,然后用间接或东西,这个数字转换为星期几。

What I would like is to put =MATCH(G2,$A$1:$D$9) into H2 and then fill cells down to H25, and have Excel indicate the column number of the day in which the adjacent name appears, then use INDIRECT or something to convert this number into the day of the week.

这可能是包括列A中的搜索数组中引起由于不同的数据类型的问题。作为一个实验,我做的第一列转换为文本,在这种情况下= MATCH!(G2,$ A $ 7:$ D $ 7)错误地返回1

It may be that including column A in the search array causes problems because of the different data types. As an experiment, I made the first column into TEXT, and in this case =MATCH(G2,$A$7:$D$7) incorrectly returns 1!

和即使如此,我不明白为什么$ B $ 7:$ D $ 7的作品,但没有$ C $ 2:$ C $ 9,也不$ B $ 7:$ D $ 8个意志

And even so, I cannot understand why $B$7:$D$7 works but neither $C$2:$C$9 nor $B$7:$D$8 will.

任何变通办法或替代战略将大大AP preciated,谢谢。

Any workarounds or alternative strategies would be greatly appreciated, thanks.

推荐答案

要做到这一点,你需要一些其他的逻辑添加到找到正确的行和列。这一总()函数做的工作。

To do this you need to add in some other logic to find the correct column and row. This AGGREGATE() Function does the job.

有关日常使用的:

=INDEX($A$1:$D$1,AGGREGATE(15,6,COLUMN($A$2:$D$9)/(($A$2:$D$9=G2)),1))

有关小时:

=INDEX($A$1:$A$9,AGGREGATE(15,6,ROW($B$1:$D$9)/(($B$1:$D$9=G2)),1))

在这里输入的形象描述

合计()函数在Excel 2010中引入的。

The AGGREGATE() Function was introduced in Excel 2010.

对于其他版本:

pre 2010年,他们将需要数组公式:

Pre 2010, they will need to be Array Formulas:

日:

=INDEX($A$1:$D$1,MIN(IF($A$2:$D$9=G2,COLUMN($A$2:$D$9))))

小时:

=INDEX($A$1:$A$9,MIN(IF($B$1:$D$9=G2,ROW($B$1:$D$9))))

作为数组公式,必须以确认退出编辑模式时,按Ctrl-Shift键,Enter键。当完成正确的Excel会自动把{}周围的公式来表示数组公式。

Being an Array Formula it must be confirmed with Ctrl-Shift-Enter when exiting Edit mode. When done correctly Excel will automatically put {} around the formula to denote an array formula.

最新的Office 360​​或在线:

Newest Office 360 or online:

日:

=INDEX($A$1:$D$1,MINIFS(COLUMN($A$2:$D$9),$A$2:$D$9,G2))

小时:

=INDEX($A$1:$A$9,MINIFS(ROW($B$1:$D$9),$B$1:$D$9,G2))


至于比赛将不会在这种情况下,工作的原因:


As to the reason MATCH will not work in this case:

MATCH()只适用于一个单一的行或列,而不是多列/行的范围。它被设置为返回一个数等于找到的顺序发生,因此必须有一个1维阵列

MATCH() only works with a single row or column and not a multiple column/row range. It is set up to return a number equal to the order place found and therefore must be a 1 dimensional array.

这篇关于MS Excel中:" MATCH()"没有找到包含文本单元格,如果查找数组太大的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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