SUBTOTAL and "empty" cell

Solved
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

  1. 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
    1. Hello
      test by leaving it empty that is "" double quotes
      0
      1. It's the same. The "" should correspond to " " I suppose because the result is the same.
        Thank you anyway
        Alain
        0
        1. Contributor
          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
          1. 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
            1. Contributor
              No problem
              Safe travels
              cordially
              0