在Excel中查找最后找到的值的位置(Find Position of Last Found Value in Excel)

我有一个表,其中列具有不同的可能值(文本)。 我想找到最后一次找到指定值的数组中的位置(使用公式,没有vba)。

例如

A1 B1 C1 D1 E1 F1 Warm Cold Warm Cool Warm Cold

我想找到上一次“冷”的位置是从A1:F1中找到的,在给出的例子中它将是“6”。

先谢谢你

JT

I have a table with columns having different possible values (Text). I would like to find the position in the array of the last time a specified value was found (with a formula, no vba).

For example

A1 B1 C1 D1 E1 F1 Warm Cold Warm Cool Warm Cold

I want to find the position of last time "Cold" was found from A1:F1, which would be "6" in the example given.

Thank you in advance

J.T.

最满意答案

考虑数组公式

=MAX(IF(A1:Z1="Cold",COLUMN(A1:Z1)))

必须使用Ctrl + Shift + Enter输入 数组公式 ,而不仅仅是Enter键。

例:

在此处输入图像描述

Consider the Array Formula:

=MAX(IF(A1:Z1="Cold",COLUMN(A1:Z1)))

Array formulas must be entered with Ctrl + Shift + Enter rather than just the Enter key.

Example:

enter image description here

更多推荐