## Forum Discussion

# AVERAGE and GET RID Off ZEROs

rachelThanks !

"AVERAGE" CRITERIAs are on sheet "DATA" at COLUMN (AD)

Also HOW CAN I change/introduce this: =IF(ISERROR($AC18);"";$AC18&IF($AC18=1;"er(e)";"e")&IF($AC18>1;"Ex";""))

IF(E18="M";"1er";"e");IF(E18="F";"ère";"e") and "Ex" if EQUAL)

I updated column Y for average. (spreadsheet attached).

You can use below formula to filter out a table.

First row is student scores.

Second row is Maxi scores.

Blank cells are excluded.

=FILTER(VSTACK(HSTACK(I18,L18,O18,R18,S18,T18,U18,V18),HSTACK($I$16,$L$16,$O$16,$R$16,$S$16,$T$16,$U$16,$V$16)),HSTACK(I18,L18,O18,R18,S18,T18,U18,V18)<>"")

Then I SUM the second row of the table. then I divide "Total" in column X by this SUM.

I don't speak French so I will need further clarification on RANK, please correct if wrong:

If only one M ranks first: 1er

if only one F ranks first: 1ère

if more than one persons rank first: 1eEx ?

- BoulakgnobotJun 27, 2024Brass Contributor
rachel Thanks !

Here in YELLOW SHEETS, I want to FILTER DATAs from 'AVERAGE STUDENT 3e! (B:E) + 'DATA DETAILS 3e! (G:G;K:K;O:O;S:S) + 'AVERAGE STUDENT 3e! (F:G) for "_3eA"'s "1st Semester"

So that : It DEPENDS from (N1) and (K2) DROP DOWN LISTS

EXAMPLE :

=IF(AND((N1="1st Semester");(K2="_3eA"));IF(AND((N1="2nd Semester");(K2="_3eA"));FILTER(

=IF(AND((N1="1st Semester");(K2="_3eB"));IF(AND((N1="2nd Semester");(K2="_3eB"));FILTER(

=IF(AND((N1="1st Semester");(K2="_3eC"));IF(AND((N1="2nd Semester");(K2="_3eC"));FILTER(and REMOVE ERRORS and ZEROS

Image Illustration below

FILE Link below

- BoulakgnobotDec 12, 2023Brass Contributor
rachelThanks

CORRECT

If only one M (male) ranks first: 1er

if only one F (female) ranks first: 1ère

if more than one persons rank first: 1eEx or 1èreEx

- rachelDec 12, 2023Steel Contributor
I think below in Z18 should work (updated spreadsheet attached)

=IF(ISERROR(AB18),"",AB18&IF(AB18=1,IF(E18="M","er","ère"),"ème")&IF(AC18>1,"Ex","")

- BoulakgnobotDec 12, 2023Brass Contributor
rachel Thanks

OBSERVATION: I don't know WHY there's DIFFERENCE between "RESULTS" sheet "AVERAGES" and "COMPOSITION" sheet "AVERAGES" ???

Example: for z Third student:

in "RESULTS" sheet "AVERAGE" = 6,59 (Y20)

while in "COMPOSITION" sheet "AVERAGE" = 8,32 (D32)

- rachelDec 12, 2023Steel Contributor
I didn't realise column Y in RESULTS should be computed in the same way as D32 in COMPOSITION.

I corrected the formula in column Y. (spreadsheet updated).

Below in RESULTS Y18 should work.

=IF(COUNT(X18)=1,$Y$16*AVERAGE(IFERROR(HSTACK(G18:H18,J18:K18,M18:N18,P18:Q18,S18:V18)/TRANSPOSE(DATA!$AC$19:$AC$30),"")),"-")

- BoulakgnobotDec 12, 2023Brass Contributor
rachel Thanks

Is there any FORMULA for sheet "RESULTS" to lookup/fill at once (B19:C117) for "Prénoms" and "Noms" ? and then "D19:F117) for "Appel", "Genre" and "Classe" ?

I can do it with:

=INDEX(DATA!B19:$B$118;MATCH($A18;DATA!$A19:$A118;0)) here my problem is I can do it but for COLUMN by COLUMN

or

FILTER(DATA!$A$19:$C$118;Results!A18;"") => here also I can do it but this will break once I add new COLUMN between them

- rachelDec 13, 2023Steel Contributor
XLOOKUP can return multiple columns in one go.

Below formula in B18 works:

=XLOOKUP($A18,DATA!$A$19:$A$118,HSTACK(DATA!$B$19:$B$118,DATA!$C$19:$C$118,DATA!$G$19:$G$118,DATA!$H$19:$H$118,DATA!$I$19:$I$118),"",0,1)

I updated column G and column H too. (updated spreadsheet attached).

- BoulakgnobotDec 13, 2023Brass Contributor
rachel thanks !

1- Here I want SHARE/DIVIDE/SPLIT my student LIST in "DATA" sheet into 05 CLASSES that are in "SPLIT LIST" sheet

a- NUMBER of CLASSES = 05

b- NUMBER of STUDENT by CLASS =

in class 01 = 11

in class 02 = 15

in class 03 = 08

in class 04 = 12

in class 05 = 07 the LEFTED of STUDENTS

2- I want also make INVISIBLE when TABLES have NO STUDENT inside

in class 06 = empty and hiden

in class 07 = empty and hiden

- rachelDec 14, 2023Steel Contributor
I think you can use OFFSET to split student list:

I also added some conditional formatting to make the table highlighted in yellow if the number of students is zero:

(If you want to make the table invisible, I guess you can change the format. e.g, background colour = no fill, font colour = white).

spreadsheet attached.

- BoulakgnobotDec 14, 2023Brass Contributor
rachel Thanks ! That works perfectly

1- Here I change it to 2 classes in ONE list in my "DATA" sheet ("DATA" sheet in COLUMN "I") that I want to "FILTER" before SHARE/DIVIDE/SPLIT when I CHOOSE a CLASS from my DROP DOWN LIST in CELL (E2)

I Don't UNDERSTAND why my FORMULA doesn't work correctly with "FILTER"

=IF(ISBLANK(OFFSET(FILTER(DATA!$B$19:$E$71;DATA!$H$19:$H$71='SPLIT LIST'!E2;"");SUM($C$26:$C$26);0;$C$27;4));"";OFFSET(FILTER(DATA!$B$19:$E$71;DATA!$H$19:$H$71='SPLIT LIST'!E2;"");SUM($C$26:$C$26);0;$C$27;4))

https://www.cjoint.com/c/MLot4UN52AE