Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Formula for searching a range and returning column headers

I’ve been working on, or at least trying to develop, a formula that goes through an array of cells, finds the max value and returns a cell that has the month that max value was found in.

Link to Google Sheet

The array I’m trying to search through is B14:M21. Once the max value is found in a column, I’d like to return a value from B13:M13. This return value (the month column where the value was found) is going to be displayed in cell H4.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

This same concept would also need to be applied to finding the year the max value is found, just in terms of rows instead of columns. I’ve tried doing hlookup, vlookup, query, index/match, etc. and none of it has worked for this application.

>Solution :

try:

=FLATTEN(SPLIT(INDEX(SORT(SPLIT(
 FLATTEN(B13:M13&"♦"&A14:A21&"♠"&B14:M21), "♠"), 2, 0), 1, 1), "♦"))

enter image description here

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading