本文介绍了在Excel中命名行为的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 高阶段
0 A
2 A
3 A
4 P
4 P
3 D
2 D
1 D
0 D。

我想创建一个名为Phase的第二列,如上所述,将Ascent,Peak或Descent对应于高度。我试图使用 IF 函数作为 IF(HeiPh =A,B3> = B2,IF(HeiPh =P D))。但是我没有得到所需的结果。我有一个大的数据集,并且有很多高度相同,如0 2 2 3 4 5 5 5 5 6等等

解决方案
  = IF(A2 = MAX(A:A),P,IF ROW(A2)< MATCH(MAX(A:A),A:A,0),A,D))

I have a dataset on height that looks like below.

Height Phase
0      A
2      A
3      A
4      P
4      P
3      D
2      D
1      D
0      D .

I want to create a second column called Phase as above that tells Ascent, Peak, or Descent at corresponding height. I tried to use the IF function as IF(HeiPh="A",B3>=B2,IF(HeiPh="P",4,"D")) . However i'm not getting the required result. I have a big dataset and there are height that is same for few times i.e. like 0 2 2 3 4 5 5 5 5 6 and so on

解决方案

Try this:

=IF(A2=MAX(A:A),"P",IF(ROW(A2)<MATCH(MAX(A:A),A:A,0),"A","D"))

这篇关于在Excel中命名行为的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-05 21:44