SUBTOTAL and "empty" cell

Solved
alainjjb Posted messages 747 Registration date   Status Member Last intervention   -  
 Revrard -
Bonjour Alain,
dans votre cas, vous pouvez modifier votre formule pour qu'elle renvoie une valeur vide au lieu d'un espace dans le cas où la recherche n'aboutit pas. Voici comment vous pouvez le faire : remplacez " " par `""` (deux guillemets sans espace) dans votre formule. Cela signifie que si la recherche échoue, la cellule renverra une véritable cellule vide.
Ainsi, votre formule pourrait ressembler à ceci : =SI(ESTERREUR(RECHERCHEV(...)), "", RECHERCHEV(...)).
De cette façon, SOUS.TOTAL comptera uniquement les cellules contenant des noms de commune.
J'espère que cela vous aidera !
Cordialement.

5 answers

Revrard
 
Hello,

The formula SUBTOTAL(3;fields) allows for summing in a column with a filter. However, the formula COUNTIF(fields;"><") correctly adds the non-empty cells but does not take the filter into account anymore.
Best regards.
1
yclik Posted messages 69 Registration date   Status Member Last intervention   1 607
 
Hello
test by leaving it empty that is "" double quotes
0
alainjjb Posted messages 747 Registration date   Status Member Last intervention   112
 
It's the same. The "" should correspond to " " I suppose because the result is the same.
Thank you anyway
Alain
0
Vaucluse Posted messages 27336 Registration date   Status Contributor Last intervention   6 453
 
Hello

In your formula, the " " corresponds to a blank and thus to a value for Excel, replace it with "" which represents nothing, except for a formula
to count how many cells in a field have results different from "":

=COUNTIF(field; "><")
Be careful of the meaning of the signs ><:
"><" counts the cells with a result except for ""
"<>" counts all cells with a formula regardless of the result

Best regards

The quality of the answer mainly depends on the clarity of the question, thank you!
0
alainjjb Posted messages 747 Registration date   Status Member Last intervention   112
 
Ah! Vaucluse, you are still so strong. "Too strong," my grandson would say. Because indeed, it works perfectly!
In fact, Subtotal wasn't the right way.
Thank you very much.
Alain
0
Vaucluse Posted messages 27336 Registration date   Status Contributor Last intervention   6 453
 
No problem
Safe travels
cordially
0