r/excel • u/Szydlikj • 9d ago
MEDIANIF formula resulting in a VALUE! error solved
Hello again everyone. Reposting from last week after having tried some of your solutions to no avail. I am trying to calculate a median value from a subset of information. On Excel 2019 version 16.
The guide I followed suggested this format, but it returns a VALUE! error:
=MEDIAN(IF(L2:L200, “Same”, Y2:Y200))
Also tried your suggestion:
=MEDIAN(IF(L2:L200=“Same”, Y2:Y200))
Which outputs 0, but there are no 0s in the subset of data.
L column is checking for subset "Same", and Y column contains the number values I want the median for. Is it possible that the issue is because the values in Y column are the result of a formula?
Thanks in advance to all you wizards!
1 Upvotes
1
u/PaulieThePolarBear 1438 9d ago
Your edit seems to be correct. A blank cell in column O will be considered equal to 0 by Excel.
Change to
The size of your range should have no impact on how Excel works, per se. But the larger the range, the higher the possibility of "bad" data.
It's almost always best to fix bad data at source rather than "code" round it. Why do you have blanks in your data? Do they have meaning?