메인 컨텐츠로 가기

Excel에서 특정 행 값을 기반으로 열 머리글을 가져 오거나 반환하는 방법은 무엇입니까?

이 자습서에서는 데이터 범위의 행에서 특정 값을 검색 한 다음 일치하는 행 셀의 해당 열 머리글을 반환합니다.

수식을 사용하여 특정 행 값을 기반으로 열 머리글 가져 오기


수식을 사용하여 특정 행 값을 기반으로 열 머리글 가져 오기

Excel의 특정 행 값을 기반으로 열 머리글을 가져 오려면 아래 수식이 도움이 될 수 있습니다.

1. 헤더를 출력 할 빈 셀을 선택하고 아래 수식을 복사 한 후 엔터 버튼 해당 헤더를 얻으려면 키를 누르십시오.

=INDEX($C$2:$G$2,SUMPRODUCT(MAX(($C$3:$G$6=I3)*(COLUMN($C$3:$G$6))))-COLUMN($C$2)+1)

참고 : 이 식에서, $ C $ 2 : $ G $ 2 헤더 범위입니다. $ C $ 3 : $ G $ 6 범위에는 검색 할 특정 값이 포함됩니다. I3 셀은 $ C $ 3 : $ G $ 6 범위에서 일치시킬 기준 값을 포함하고 $ C $ 2는 $ C $ 3 : $ G $ 6 범위의 첫 번째 열입니다. 필요에 따라 변경하십시오.


관련 기사

Vlookup 값 및 Excel에서 true 또는 false / yes 또는 no 반환
목록에서 값을 조회하고 결과에 대해 True / False 또는 Yes / No를 표시하려면이 문서의 방법이 도움이 될 것입니다.

셀에 Excel의 특정 텍스트가 포함 된 경우 다른 셀의 값 반환
셀 E6에 "Yes"값이 포함되어 있다고 가정하면 셀 F6에 "approve"값이 자동으로 채워집니다. E6에서 "Yes"를 "No"또는 "Neutrality"로 변경 한 경우 F6의 값은 즉시 "Deny"또는 "Reconsider"로 변경됩니다. 그것을 달성하기 위해 어떻게 할 수 있습니까? 이 문서에서는 쉽게 해결할 수있는 몇 가지 유용한 방법을 수집합니다.


  • 슈퍼 포뮬러 바 (여러 줄의 텍스트와 수식을 쉽게 편집 할 수 있습니다.) 레이아웃 읽기 (많은 수의 셀을 쉽게 읽고 편집합니다.) 필터링 된 범위에 붙여 넣기...
  • 셀 / 행 / 열 병합 및 데이터 보관; 셀 내용 분할; 중복 행과 합계 / 평균 결합... 중복 셀 방지; 범위 비교...
  • 중복 또는 고유 선택 행; 빈 행 선택 (모든 셀이 비어 있음); 슈퍼 찾기 및 퍼지 찾기 많은 통합 문서에서; 무작위 선택 ...
  • 정확한 사본 수식 참조를 변경하지 않고 여러 셀; 참조 자동 생성 여러 시트에; 글 머리 기호 삽입, 확인란 등 ...
  • 즐겨 찾기 및 빠른 수식 삽입, 범위, 차트 및 그림; 셀 암호화 암호로; 메일 링리스트 생성 이메일 보내기 ...
  • 텍스트 추출, 텍스트 추가, 위치 별 제거, 공간 제거; 페이징 부분합을 만들고 인쇄합니다. 셀 내용과 주석 간 변환...
  • 슈퍼 필터 (다른 시트에 필터 구성표 저장 및 적용) 고급 정렬 월 / 주 / 일, 빈도 등 특수 필터 굵은 기울임 꼴로 ...
  • 통합 문서와 워크 시트 결합; 키 열을 기반으로 테이블 병합; 데이터를 여러 시트로 분할; xls, xlsx 및 PDF 일괄 변환...
  • 피벗 테이블 그룹화 기준 주 번호, 요일 등 ... 잠금 해제되고 잠긴 셀 표시 다른 색상으로; 수식 / 이름이있는 셀 강조 표시...
kte 탭 201905
  • Word, Excel, PowerPoint에서 탭 편집 및 읽기 사용, Publisher, Access, Visio 및 Project.
  • 새 창이 아닌 동일한 창의 새 탭에서 여러 문서를 열고 만듭니다.
  • 생산성을 50% 높이고 매일 수백 번의 마우스 클릭을 줄입니다!
officetab 하단
Comments (18)
Rated 4.5 out of 5 · 1 ratings
This comment was minimized by the moderator on the site
Muito obrigada pelo conteúdo!!! Excelente!
This comment was minimized by the moderator on the site
Muchas gracias por la información y el interés prestado!!
Saludos
This comment was minimized by the moderator on the site
Muchas gracias por todo!!
Una pregunta: ¿Cómo puedo regresar los encabezados de una tabla en una misma celda?
Rated 4.5 out of 5
This comment was minimized by the moderator on the site
Hi Algendar,
Do you mean to search for multiple values and return matching headers in a single cell? If so, simply join the same formula containing different search values in one cell with the Ampersand symbol (&). See the screenshot below.
=INDEX($C$2:$G$2,SUMPRODUCT(MAX(($C$3:$G$6=I3)*(COLUMN($C$3:$G$6))))-COLUMN($C$2)+1) & " " & INDEX($C$2:$G$2,SUMPRODUCT(MAX(($C$3:$G$6=I4)*(COLUMN($C$3:$G$6))))-COLUMN($C$2)+1)
https://www.extendoffice.com/images/stories/comments/comment-picture-zxm/get-header.png
This comment was minimized by the moderator on the site
So say that there will be entries where the values in I3 may not be found, for all of those cells it tries to output every column header in the range giving me a #ref error since it my sheet isnt long enough to accommodate all the titles again, is there any way for it to just output a blank cell in these cases?
This comment was minimized by the moderator on the site
Hi Jerry,
The following formula can do you a favor. Please give it a try.
=IFERROR(INDEX($C$2:$G$2,SUMPRODUCT(MAX(($C$3:$G$6=I3)*(COLUMN($C$3:$G$6))))-COLUMN($C$2)+1),"")
This comment was minimized by the moderator on the site
Hello,
If we have multiple I3 values will it give the second header which has the same value.
If there is anything to do so, please let me know.
This comment was minimized by the moderator on the site
Hi Deepak,
Can you attach a screenshot to describe the problem you encountered more clearly?
This comment was minimized by the moderator on the site
Hello, what if we have missing values ? why does it return the last header ?
Can it be arranged so we don't fill the cell with anything in case it's missing ?
This comment was minimized by the moderator on the site
Hi Mono,
The following formula may help. If no condition is specified, the result will be displayed as null even if there are missing values in the original range.
=IF(I3="", "", INDEX($C$2:$G$2,SUMPRODUCT(MAX(($C$3:$G$6=I3)*(COLUMN($C$3:$G$6))))-COLUMN($C$2)+1))
This comment was minimized by the moderator on the site
How to modify this formula to return specific value if there's no match?
This comment was minimized by the moderator on the site
Amazing. This is very helpful,I was wondering if the value matches more than one header, how to get all headers
This comment was minimized by the moderator on the site
Did you find a solution to this?
This comment was minimized by the moderator on the site
Hi. Awesome example. Any thoughts about if there are duplicate values?
This comment was minimized by the moderator on the site
Hey, were you able to find an answer to this problem ?
The formula here presented is working great for me except this particular matter of having duplicated valuesIs there a way to only take into account the first true value the formula encounters?
This comment was minimized by the moderator on the site
hey, i don't know if there is a way, but something that may be of help is the =Unique command, which counts only the unique data (not replicates of the same data) Hope this helped or what you were looking for :)
This comment was minimized by the moderator on the site
Thank you for this. Very helpful :)
This comment was minimized by the moderator on the site
ur welcome 
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations