Apr 26 2022 06:06 AM
Hi
I'm trying to return the header that matches the highest value in a row but I'm having some trouble with my formula.
=INDEX(Sheet2!A1:F1,0,MATCH(MAX(Sheet2!A10:F10,Sheet2!A13:F13),Sheet2!A10:F10,Sheet2!A13:F13,0))
thanks
Apr 26 2022 06:49 AM
Can you add an image of the array of data in Sheet2? It would help those of us who'd like to help you; otherwise we're not only having to diagnose a formula, but also visualize what it is that said formula is working on. Please, help us help you.
Apr 26 2022 09:06 AM
You may take this Excel formula: Get location of value in 2D array | Exceljet as the basis
Apr 26 2022 09:17 AM
That's an amazing formula, @Sergei Baklan I like exceljet and often use it; glad to see you do too.
Apr 26 2022 10:04 AM
Dave makes a great job, he systemises all around Excel. Not to explain this and that from scratch usually it's much better to give link on his resource.
Apr 26 2022 04:15 PM
@mathetes I can't provide the exact image as it's for working purposes.
Below is a similar example of what I'm trying to do. Basically in cell B4 on sheet 1 I want it to reference the header of the fruit that is the best producing in sheet 2. In the example below with the right formula that would produce cherries. (The formula I had originally won't match this, that too was just an example I threw together).
Apr 27 2022 07:33 AM
I've created a spreadsheet to test a few assumptions, ask a question or two of you along the lines of "What-if?" that spreadsheets are supposed to help answer.
For example, take a look at this screen grab.
So, some questions:
Apr 27 2022 10:57 AM
I've gone ahead and answered my question in the attached spreadsheet. It assumes that, with multiple rows per type of product, your "highest" would be the one with the highest total for all rows, rather than the one with highest individual cell. Here's what it looks like, and the formula (looking for the highest in the totals row) is shown there in the top. It uses the relatively new FILTER function (so you'll need the most current version of Excel).
By the way, since it's possible that two or even three of the columns could end up producing exactly equal totals, the FILTER function will display all three in the cells to the right of the primary display. Try it when you've downloaded the spreadsheet.
Apr 27 2022 11:54 AM