Home > Net >  counting the number of rows on a table containg data
counting the number of rows on a table containg data

Time:03-23

In googlesheets i'd like a formula that looks at an entire table and for each row that contains data it comes back as 1, and adds all those 1s togteher. All I;ve come up with some far is a formula that repeats the action of looking at one

ie

(if(COUNT(IMPORTRANGE($C11,($D11&"!"&(HLOOKUP((match(K$1,(IMPORTRANGE($C11,($D11&"!$A$3:$ZZ$3"))) ,0)),Lookups!$7:$8,2))&"6:"&(HLOOKUP((match(L$1,(IMPORTRANGE($C11,($D11&"!$A$3:$ZZ$3"))) ,0))-1,Lookups!$7:$8,2))&"6")))>0,1,0))

(if(COUNT(IMPORTRANGE($C11,($D11&"!"&(HLOOKUP((match(K$1,(IMPORTRANGE($C11,($D11&"!$A$3:$ZZ$3"))) ,0)),Lookups!$7:$8,2))&"7:"&(HLOOKUP((match(L$1,(IMPORTRANGE($C11,($D11&"!$A$3:$ZZ$3"))) ,0))-1,Lookups!$7:$8,2))&"7")))>0,1,0))

(if(COUNT(IMPORTRANGE($C11,($D11&"!"&(HLOOKUP((match(K$1,(IMPORTRANGE($C11,($D11&"!$A$3:$ZZ$3"))) ,0)),Lookups!$7:$8,2))&"8:"&(HLOOKUP((match(L$1,(IMPORTRANGE($C11,($D11&"!$A$3:$ZZ$3"))) ,0))-1,Lookups!$7:$8,2))&"8")))>0,1,0))

and so on

CodePudding user response:

Assuming a table in the range A1:C8, use:

=sum(index(n(mmult(n(A1:C8<>""),sequence(columns(A1:C8))^0)>0)))

enter image description here

CodePudding user response:

try:

=INDEX(COUNTA(TRIM(FLATTEN(QUERY(TRANSPOSE(A1:C),,9^9)))
  • Related