View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Aaron Aaron is offline
external usenet poster
 
Posts: 287
Default lookup column label based on data in cell

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