在Excel 2010中返回值的列位置 [英] Return column location of a value in Excel 2010
本文介绍了在Excel 2010中返回值的列位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个简单的问题:我正在返回一个输入值的列标题。示例如下
I have a simple ask: I am trying to return the column title for an inputted value. Example below
Column 1 Column 2 Column 3
1 7 19
3 31 33
4 12 14
所以如果我输入了值31,我想返回列2
So if I inputted the value "31", I would like to return "Column 2"
任何人都知道这是如何完成的?谢谢!
Anyone know how this is done? Thanks!
推荐答案
您可以使用此数组公式
= INDEX(1:1,SMALL(IF(A2:C4 = 31,COLUMN(A2:C4)),1))
确认与 CTRL + SHIFT + ENTER
如果31没有不会发生在A2:C4你会得到一个错误[#NUM!]
If 31 doesn't occur in A2:C4 you'll get an error [#NUM!]
如果31在这个范围内发生多次,你会得到第一次发生(即最左边的一列)
If 31 occurs more than once in that range you'll get the header from the first occurence (i.e. the leftmost column)
这篇关于在Excel 2010中返回值的列位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文