excel - Max IF While Filtering dates? -
how can find max date less today in range mixed both actual , projected dates:
as see here have row of dates. dates actual, others projected. want open spreadsheet , "what latest projected date less today?"
if want in single formula, need use array formula. array formulas calculate multiple times, once each cell in range, , provide array of responses. solve part 1 of you're asking, array formula (assuming columns end @ h, , on row 2 only):
=max(if(a1:h1="projected",a2:h2,""))
when typed formula bar, confirm ctrl + shift + enter, instead of enter. afterwards (do not type {} yourself):
{=max(if(a1:h1="projected",a2:h2,""))}
this looks @ each cell a1:h1. says "projected", gives value in a2:h2 column [otherwise gives ""]. find date highest, wrap in max function.
but we're not done, because have other criteria. use , function this, , functions take array results , collapse them single value. need use natural true / false function of if statement instead, so:
=max(if(a1:h1="projected",if(a2:h2<today(),a2:h2,""),""))
this checks in row 1 = "projected", while @ same time column in row 2 less value of today's date. provides date. takes highest date shown. remember confirm ctrl + shift + enter, instead of enter.
Comments
Post a Comment