MAX IF Array Formula Returning Zero

branches

I have the following data in Excel Sheet "Sheet1":

     A           B
1    MY_FIELD    YEAR
2    333         2010
3    354         2012
4    100         2013
5    145         2010

I am attempting to return the maximum value of MY_FIELD for each year in another sheet. In this other sheet I have

    A      B
1   YEAR   MAX_VALUE
2   2010
3   2011
4   2012
5   2013

Into B2 I enter

=MAX(IF(Sheet1!$B$1:$B$5=A2,Sheet1!$A$1:$A$5))

with CTRL+SHIFT+ENTER to enter as an array formula.

This is returning zero. I understand this occurs if the value searched for is not found, but I can see the value searched for, A2, is 2010, which is present in the array Sheet1!$B$1:$B$5.

What is the error in my formula or my approach?

branches

The years in Sheet1!$B$1:$B$5 were formatted using TEXT(DATE,"YYYY"). This returns text fields. The formula requires strictly numbers.

Copying the data in Sheet1!$B$1:$B$5, pasting as values, and setting all to number, returns in the formula working.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Array formula Google sheets returning unexpected results

From Dev

Formula returning Column A value for row containing MAX value of a range

From Dev

Excel Formula to find max value in array

From Dev

Using MIN/MAX in excel array formula

From Dev

typeof(T).GetFields() returning zero length array

From Dev

mySQL min() and max() query array echoing zero

From Dev

Max/Min/Avg returning array in that order

From Dev

VBA Evaluate function and array formula returning range of values

From Dev

Array length in angularjs returning zero even though the data is present

From Dev

Printing an array with input from user. Returning first value a zero?

From Dev

Why is math.max() returning NaN on an array of integers?

From Dev

Quadratic Formula returning an error

From Dev

Quadratic Formula returning an error

From Dev

Formula returning "0"

From Dev

Excel formula - min, max

From Dev

Octave division returning zero

From Dev

Case statement returning zero

From Dev

Scrapy returning zero results

From Dev

List iterator returning zero

From Dev

strcasecmp is not returning zero

From Dev

GetProcessId returning zero

From Dev

List iterator returning zero

From Dev

VBA : Sumifs returning zero

From Dev

Clear Zero Both Formula and Non Formula Cells

From Dev

MySQL max() - not returning max() value

From Dev

Crystal Formula field - Splitting a string array of numbers, summing them, and returning the total returns a boolean instead of a number

From Dev

Hibernate Column Formula returning null

From Dev

COUNTIF Formula not returning expected values

From Dev

Hibernate Column Formula returning null