Question

Hello everybody and sorry for my English but I'm not a native speaker.

I have a database that is already full of data and I would like to save the time to create another column only for a basic operation.

What I would like to do is to a find a way to calculate the max difference between 2 columns [for example Revenues for 2013 and Revenues for 2011] and then have the product written in another cell.

The database is structured like this.

1. Product1 - Revenues for 2013 - Revenues for 2012 - Revenues for 2011
2. Product2 - Revenues For 2013 - Revenues for 2012 - Revenues for 2011

="The product that has grown the most during the last 2 years is"&FORMULA&

I thought that I could make it with a INDEX/MATCH function combined with a MAX of the difference between the two values in the MATCH part, but it does not work since there is no reference in the matrix for the values.

This is why I'm asking for help, since there must be a solution but I couldn't find it online.

Thanks again!

Was it helpful?

Solution

By Adding new Column:

Easiest way will be to create a a difference column and use index match and max function together like this:

=INDEX(A2:E4,MATCH(MAX(E2:E4),E2:E4,0),1)

enter image description here

Without Adding new Columns:

if you don't want to create new column. then replace Max(E2:E4) part with MAX(B2:B5-D2:D5) in above formula and confirm with CTRL+SHIFT+ENTER not just ENTER... you will see { } brackets appear. See below:

 {=INDEX(A2:D5,MATCH(MAX(B2:B5-D2:D5),B2:B5-D2:D5,0),1)}

enter image description here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top