excel - MAX date value within a range with 2 conditions -
to make easy
+---+----+-------------+ | | | b | +---+----+-------------+ | 1 | xx | 12-05-2015 | | 2 | xx | 15-05-2015 | | 3 | yy | 13-05-2015 | | 4 | yy | 16-05-2015 | +---+----+-------------+
(today 14-05-2015)
i need max date value each "a" value if before today. in case it's not, move 2nd biggest value. case not find, empty cell.
what i've done far:
=max($a$1:$a$4='xx';$b$1:$b$4<today();$b$1:$b$4)
and confirm shift+ctrl+enter
the error yields 13-05-2015 max value xx, wrong (as if not take account $a$1:$a$4='xx'
you need use nested if-functions. i.e. change formula into:
{=max(if($a$1:$a$4="xx", if($b$1:$b$4<today(), $b$1:$b$4)))}
and end ctrl+shift+enter
Comments
Post a Comment