Return column header of first cell identified in consecutive cells that meet criteria

zara007

New Member
Joined
May 30, 2018
Messages
3
Hello, I would like to be able to get the column header of the first cell from an identified event of consecutive cells that fall below a threshold. Example data is below (column headers on 2nd row).

I can identify the longest consecutive event, when more than one cell has data that falls below the threshold, using the following CSE formula: =MAX(FREQUENCY(IF(A3:N3
P3,COLUMN(A3:N3))))

In column S, I'd like the cell to return '9' for the first row of data (the first cell at the start of the longest event) and '1' for the next row.

[TABLE="width: 900"]
<tbody>[TR]
[TD]A
[/TD]
[TD]B
[/TD]
[TD]C
[/TD]
[TD]D
[/TD]
[TD]E
[/TD]
[TD]F
[/TD]
[TD]G
[/TD]
[TD]H
[/TD]
[TD]I
[/TD]
[TD]J
[/TD]
[TD]K
[/TD]
[TD]L
[/TD]
[TD]M
[/TD]
[TD]N
[/TD]
[TD]O
[/TD]
[TD]P
[/TD]
[TD]Q
[/TD]
[TD]R
[/TD]
[TD]S
[/TD]
[/TR]
[TR]
[TD="align: right"]1
[/TD]
[TD="align: right"]2
[/TD]
[TD="align: right"]3
[/TD]
[TD="align: right"]4
[/TD]
[TD="align: right"]5
[/TD]
[TD="align: right"]6
[/TD]
[TD="align: right"]7
[/TD]
[TD="align: right"]8
[/TD]
[TD="align: right"]9
[/TD]
[TD="align: right"]10
[/TD]
[TD="align: right"]11
[/TD]
[TD="align: right"]12
[/TD]
[TD="align: right"]13
[/TD]
[TD="align: right"]14
[/TD]
[TD]90th Percentile
[/TD]
[TD]Threshold
[/TD]
[TD]Number of times data drops below threshold
[/TD]
[TD]Longest consecutive event
[/TD]
[TD]Start (Column Header)
[/TD]
[/TR]
[TR]
[TD="align: right"]50
[/TD]
[TD="align: right"]50
[/TD]
[TD="align: right"]50
[/TD]
[TD="align: right"]50
[/TD]
[TD="align: right"]50
[/TD]
[TD="align: right"]50
[/TD]
[TD="align: right"]50
[/TD]
[TD="align: right"]50
[/TD]
[TD="align: right"]25
[/TD]
[TD="align: right"]20
[/TD]
[TD="align: right"]25
[/TD]
[TD="align: right"]28
[/TD]
[TD="align: right"]50
[/TD]
[TD="align: right"]50
[/TD]
[TD="align: right"]50
[/TD]
[TD="align: right"]30
[/TD]
[TD="align: right"]4
[/TD]
[TD="align: right"]4
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]22
[/TD]
[TD="align: right"]22
[/TD]
[TD="align: right"]25
[/TD]
[TD="align: right"]25
[/TD]
[TD="align: right"]50
[/TD]
[TD="align: right"]50
[/TD]
[TD="align: right"]50
[/TD]
[TD="align: right"]25
[/TD]
[TD="align: right"]25
[/TD]
[TD="align: right"]25
[/TD]
[TD="align: right"]50
[/TD]
[TD="align: right"]50
[/TD]
[TD="align: right"]25
[/TD]
[TD="align: right"]50
[/TD]
[TD="align: right"]50
[/TD]
[TD="align: right"]30
[/TD]
[TD="align: right"]8
[/TD]
[TD="align: right"]4
[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]


Any help would be greatly appreciated.</P3,COLUMN(A3:n3)),if(a3:n3>
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.

Forum statistics

Threads
1,224,817
Messages
6,181,149
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top