Search code examples
google-sheetsgoogle-sheets-formula

What's going on with my max value operation in google sheets?


I'm doing a very simple max function to find the max between 2 cells, it works on the first few lines, but doesn't work the rest of the way down.
You'll see in the pic the max functions are in column R and only find the max between cells in column P and Q.
What you can't see is Column P is data input manually, while column Q references a different cell that contains a formula.

Why is this not working? thanks

pic of max function


Solution

  • The issue with your ranges is that the values in range Q1:Q are NOT numbers.

    Reading the official page about the MAX function:

    Each value argument must be a cell, a number, or a range containing numbers. Cells without numbers or ranges are ignored. Entering text values will cause MAX to return the #VALUE! error. To allow text values, use MAXA.

    Because they are not numbers they are considered as 0.
    So, when using =max(P2,Q2) the result appears realistic.
    But not always.

    Do test your values using =ISNUMBER()
    You can correct the formulas by formatting values as numbers.

    enter image description here