Search code examples
if-statementgoogle-sheetsgoogle-sheets-formulamediangs-vlookup

Google Sheets MEDIAN Values from a single cell


With the formula below:

=IFNA(IF(AND(F5="",F5=0),0,MEDIAN((M4+((K5*(VLOOKUP(E5,TourData,4,FALSE)+VLOOKUP(AF$4,ClanData,2,FALSE))-((J5-K5)*VLOOKUP(E5,TourData,5,FALSE))))),C5:D5)),0)

Is it possible to take the second MEDIAN Value, C5:D5 and put that value in one cell? Currently C5=0 & D5=1000. Would it be possible to do something like 0/1000 in C5 and get the same results in the formula above? I’ve tried using LEFT(), RIGHT(), & SPLIT() with no success. The only caveat is that the number of characters before & after the delimiter '/' can be anywhere between 1 & 4 characters.

Any help would be greatly appreciated.


Solution

  • if the above formula works for you, you can do simple split like:

    =IFNA(IF(AND(F5="", F5=0), 0, MEDIAN((M4+((K5*(
     VLOOKUP(E5,   TourData, 4, 0)+
     VLOOKUP(AF$4, ClanData, 2, 0))-((J5-K5)*
     VLOOKUP(E5,   TourData, 5, 0))))), SPLIT(C5, "/"))), 0)
    

    enter image description here