查找范围内的部分文本,返回索引 [英] Finding partial text in range, return an index
问题描述
我需要在特定范围内找到一个部分文本,并获得一个值,该值是找到的文本的单元格索引下的X行。我尝试了INDEX和MATCH功能,但没有成功。
I need to find a partial text in a specific range and get a value which is X rows under cell index of found text. I have tried with INDEX and MATCH functions but without success.
例如:寻找部分文本 ASDFGHJK
,需要返回值三行在:(我需要这个值
)。我试图找到找到的单元格和+3的行索引以获得所需的值(我需要这个值),但没有成功。
As in example: looking for a partial of text ASDFGHJK
and need returned the value three rows under: (I NEED THIS VALUE
). I have tried to get a row index of found cell and +3 to get needed value ("I NEED THIS VALUE") but without success.
任何想法如何做?
推荐答案
您可以使用所以假设H1的通配符与 MATCH
一样,按照彼得的回答,假设ASDFGHJK可以使用这个常规公式。
You can use "wildcards" with MATCH
so assuming "ASDFGHJK" in H1 as per Peter's reply you can use this regular formula
= INDEX(G:G,MATCH(*& H1&*,G:G,0)+3)
MATCH只能引用单个列或行,因此如果要搜索6列,您必须设置具有6个MATCH函数的公式或更改为另一种方法 - 尝试此数组公式,假定搜索数据A2:G100
MATCH can only reference a single column or row so if you want to search 6 columns you either have to set up a formula with 6 MATCH functions or change to another approach - try this "array formula", assuming search data in A2:G100
= INDIRECT(R& REPLACE(TEXT(MIN(IF(ISNUMBER(SEARCH :G100)),(ROW(A2:G100)3)* 1000 + COLUMN(A2:G100))), 000000),4,0, C),FALSE)
确认使用 Ctrl - Shift - 输入
confirmed with Ctrl-Shift-Enter
这篇关于查找范围内的部分文本,返回索引的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!