Search code examples
google-sheetsmaxextractaveragespreadsheet

How to find the MAX value from multiple cells containing strings, after a certain character?


I have data that looks like this in Google Sheets:

Data

What I am trying to do is, get the numbers after the forward slash, and find the maximum and average of them. For example, with this data, the max would return 126. I'm wondering if there is way to loop through the values with a Regex selection, to find the max and average.

I have tried using Regex from Google searching, but nothing has looped through multiple values when trying to find a max.


Solution

  • try MAX:

    =INDEX(MAX(1*IFERROR(REGEXEXTRACT(A1:A4; "\/(\d+)"))))
    

    enter image description here

    and AVERAGE:

    =INDEX(AVERAGE(1*IFERROR(REGEXEXTRACT(A1:A4; "\/(\d+)"))))
    

    enter image description here