根据搜索条件查找列名

编程入门 行业动态 更新时间:2024-10-11 21:21:07
本文介绍了根据搜索条件查找列名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有以下Excel电子表格:

I have the following Excel spreadsheet:

A B C D E F 1 MFC2 MFC1 QFC Search Criteria: CW14 2 CW11 Column Name: MFC1 3 CW13 4 CW14 5 CW17 6 CW18 7 CW19 8 9

在Cells A1:C8中,我有不同的日历周.他们都是唯一! 在Cell E2中,我希望根据Cell E1中的值显示column name. 在这种情况下,搜索条件为CW14,因此结果应为列名MFC1.

In Cells A1:C8 I have different calender weeks. All of them are unique! In Cell E2 I want that the column name is displayed based on the value that is put in Cell E1. In this case the search criteria is CW14 so the result should be column name MFC1.

我尝试通过此修改公式问题,但无法正常工作:

I tried to modify the formula from this question but could not make it work:

E1 = INDEX($A$1:$C$1,MATCH(E$1,$A$2:$C$30,0))

此公式给了我#NV结果. 我需要做些什么才能得到想要的结果?

This formula gives me #NV as result. What do I need to change to get the desried result?

推荐答案

使用AGGREGATE代替MATCH:

Use AGGREGATE instead of MATCH:

=INDEX(1:1,AGGREGATE(15,7,COLUMN($A$2:$C$30)/($A$2:$C$30=$E$1),1))

更多推荐

根据搜索条件查找列名

本文发布于:2023-11-30 06:22:12,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1649008.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:条件

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!