Median formula according to selected dates

Brass Contributor

Screen Shot 2563-04-15 at 15.37.55.png

What formula do I have to put into F2 (and F7, F12, F17 respectively) in order to find...

- Median of the First Reply (excluding 'null' results)

- The data F2 refers to is in accordance with the date range from B2:B3.

 

 

 

 

 

 

 

Here is the source where the formula could refer to the data.

Screen Shot 2563-04-15 at 15.32.13.png

4 Replies

@little2fern 

 

Do you mean by "median" that you want to calculate the date in the middle between the two dates in B2 and B3?

 

If so, the formula to put in F2 is =B2+((B3-B2)/2)

 

If not, please come back and clarify. ideally by posting your actual spreadsheet, not just an image of it.

@little2fern 

For the sample in attached file

image.png

formula could be

=MEDIAN(IF(($B$2:$B$22>=$E$2)*($B$2:$B$22<=$F$2),$C$2:$C$22,"null"))

It is assumed in every cell of the range you have text ("null") or number. Function ignores all texts. It is assumed as well you have correct dates everywhere, not texts which represent the dates.

@Sergei Baklan 

 

Hello, Sergei. I tried the formula you suggested, but this warning came up. What should I do?

This data is transferred over to Google Sheets as I need to display it there. Is that why there's a null error?Screen Shot 2563-04-16 at 15.01.07.png

@little2fern 

For Excel:

1) That is an array formula which shall be entered by Ctrl+Shift+Enter if only you are not on Excel with Dynamic Arrays

2) MEDIAN() ignores all texts in the range

 

Have no idea how it works in Google Sheets.