Crosswords3 mins ago
Excel Conundrum......
15 Answers
Ok I'm not a Jedi Master of Excel but I count myself as a reasonable padawan, anyway this is what I'd like to do: I have of course googled but nothing as yet does what I want. OK I have a column the cells of which are either populated or not. I would like to obtain a value for the longest section of contiguously populated cells in that column. eg so Col A reading down has. A,B,C,blank,blank,A,B, blank, A,B,C,D,blank,A - I would like to extract the number 4 from that, ie A,B,C,D is the longest contiguously populated sequence in the column. Any ideas? thanks.
Answers
Assuming Column A with 20 Rows = MAX( FREQUENCY( IF( A1: A20"", ROW( A1: A20)), IF( A1: A20="", ROW( A1: A20)))) This is an array formula and must be entered with Control + Shift + Enter, except in Excel 365 which has native control of array formulas . If entered correctly you'll see the formula wrapped in curly braces {} in the formula bar.
14:50 Tue 20th Jun 2023
Assuming Column A with 20 Rows
=MAX(FREQUENCY(IF(A1:A20"",ROW(A1:A20)),IF(A1:A20="",ROW(A1:A20))))
This is an array formula and must be entered with Control + Shift + Enter, except in Excel 365 which has native control of array formulas .
If entered correctly you'll see the formula wrapped in curly braces {} in the formula bar.
=MAX(FREQUENCY(IF(A1:A20"",ROW(A1:A20)),IF(A1:A20="",ROW(A1:A20))))
This is an array formula and must be entered with Control + Shift + Enter, except in Excel 365 which has native control of array formulas .
If entered correctly you'll see the formula wrapped in curly braces {} in the formula bar.
First of all bhg thanks that's a way of doing it that I had not considered and that would work. However, hats off to ABerrant that is genius, not done much in the way of array functions so I'm grateful to you for that, I got it working in a test sheet but not in my main sheet but that's probably me not typing it correctly. Anyway BA, well earned.
Related Questions
Sorry, we can't find any related questions. Try using the search bar at the top of the page to search for some keywords, or choose a topic and submit your own question.