Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hello
I have a table that looks something like this: A B C D 1 0 0 0 1 2 0 0 0 0 3 0 1 0 0 4 0 1 1 0 5 0 0 0 0 6 1 0 0 0 On a separate sheet, I have the list sorted to exclude rows without a "1" in any column. What I'd like to do, for the columns that do have a 1, is return the column label. The column labels are reasons for events, so the result would be for "Event" 1, "Reason" D. It doesn't matter if there's more than one 1 in a column, only one of the reasons needs to be returned. I'd rather not use a macro to do this, does anyone know of a way with just functions? Thanks |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Try this in cell in row 2 of your filtered data and copy down (say F2):
=INDEX($A$1:$D$1,0,MATCH(1,$A2:$D2,0)) will return column heading from row 1 Is this what you require? "Aaron" wrote: Hello I have a table that looks something like this: A B C D 1 0 0 0 1 2 0 0 0 0 3 0 1 0 0 4 0 1 1 0 5 0 0 0 0 6 1 0 0 0 On a separate sheet, I have the list sorted to exclude rows without a "1" in any column. What I'd like to do, for the columns that do have a 1, is return the column label. The column labels are reasons for events, so the result would be for "Event" 1, "Reason" D. It doesn't matter if there's more than one 1 in a column, only one of the reasons needs to be returned. I'd rather not use a macro to do this, does anyone know of a way with just functions? Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
insert date | Excel Worksheet Functions | |||
conditional cell format based on cell in same row, previous column | Excel Worksheet Functions | |||
Help with copying dynamic column selected based on remote cell value and dynamic formula fill | Charts and Charting in Excel | |||
up to 7 functions? | Excel Worksheet Functions | |||
GET.CELL | Excel Worksheet Functions |