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

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -

java - Digest auth with Spring Security using javaconfig -