excel - Exce 2013l: Transpose header and count matrix -


is possible generate dynamically total-matrix table? have students list courses marked (with "1" symbol):

enter image description here

i need transpose header, , count how many students have 2 courses @ same time, each course, this:

enter image description here

is possible dynamically?

step 1

copy headers. assuming first table in range a1:n25 can start generating our header row basic of formulas , copying right far required. in example placed formula below in cell q1.

=b1 

step 2

transpose headers. there transpose function, copy paste function, opted go simple index function. in p2 placed following formula , copy down far needed.

=index($q$1:$ac$1,row(a1)) 

the row(a1) part acts counter formula copied down , increases column in reference range q1:ac1 read from.

step 3

count number occurrences there 1 in column matches header top, , 1 in column matches header on left. place following formula in q2 , copied down , right far required.

=if(match(q$1,$q$1:$ac$1,0)>match($p2,$q$1:$ac$1,0),"",countifs(index($b$2:$n$25,0,match(q$1,$b$1:$n$1,0)),1,index($b$2:$n$25,0,match($p2,$b$1:$n$1,0)),1)) 

the first part of if checks see if count should performed or if blank value should shown.

step 4

bolding text when header top equal header on right. can manually, or can use conditional formatting. logical formula conditional formatting be:

=q$1=$p2 

have range q2 ac14 selected q2 being active cell when enter conditional formatting , select formula method. after entering formula select format, select font tab, , select bold.

proof of concept

poc


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -