excel - how to sum first 5 values in column B corresponding to a particular text in column C? -
i want add first "n" number of values of 1 column b when corresponding values of column c in same row equals "text"
to non-array formula suggest in d1:
=if((c1="text")*(countif(c$1:c1,"text")=5),sumif(c$1:c1,"text",b$1:b1),"")
and copy down.
a different approach using array formula like:
{=sumif(c1:index(c1:c100,small(if(c1:c100="text",row(c1:c100)),5)),"text",b:b)}
which whole work in 1 step ;)
Comments
Post a Comment