1

I have 12 columns with 0,1 inside. I have put them headers the name of months. I am trying to get the first three, 1 , from left to right and get the corresponding header in column 13, 14, 15 .

I started with the following but I get only the first header.

=INDEX(B$2:M$2;MATCH(TRUE;INDEX(B3:M3<>0;);0))

How can I do it? thank you

enter image description here

Maria Georgali
  • 629
  • 1
  • 9
  • 22

1 Answers1

3

Put this in N3 and copy over:

=INDEX($2:$2,AGGREGATE(15,7,COLUMN($B3:$M3)/($B3:$M3<>0),COLUMN(A:A)))

enter image description here

Scott Craner
  • 148,073
  • 10
  • 49
  • 81