Hoy Aprendí… que la función COUNTIF puede usar ? representando cualquier carácter

Hoy† aprendí que la función =COUNTIF de Microsoft Excel puede usar “?” para indicar un único carácter cualquiera…

Inicialmente había escrito =COUNTIF(named_range,"x")+COUNTIF(named_range,"?") porque algunas de las celdas podrían contener una “x” o un signo de interrogación, y obtenía un resultado que era el doble de lo que esperaba.

Al cambiarlo simplemente a =COUNTIF(named_range,"?")funcionó a la perfección… Si una de las celdas en el rango está vacía, o tiene más de un carácter, ¡no lo cuenta! Y también es insensible a mayúsculas y minúsculas.

Y lo acabo de comprobar en LibreOffice Calc y Apple Numbers, ¡y también funciona en esas aplicaciones!

Ojalá os resulte útil…

† Compartido originalmente (en inglés) en Mastodon.

#COUNTIF #LibreOffice #MicrosoftExcel #Numbers #SpreadsheetFormulas #Spreadsheets #TIL #TodayILearned

Today I Learned that the `=COUNTIF` function in Excel can use "?" as a placeholder for a single character… I had written `=COUNTIF(named_range,"x")+COUNTIF(named_range,"?")` because some of the cells could be an "x" or a question mark, and getting double counting… changed it to `=COUNTIF(named_range,"?")` and worked like a charm… If one of the cells in the range is empty, or has more than one character, it does not count it! And it is also case insensitive.

Just checked in LibreOffice Calc, and Apple Numbers, and it also works there!

#TIL #TodayILearned #Excel #MicrosoftExcel #LibreOfficeCalc #AppleNumbers #COUNTIF #Spreadsheets #SpreadsheetFormulas

Going nuts here. Can't find the answer. Help, please. 😕 #spreadsheets #GoogleSheets

How do I #countif e3=f3 all the way down the column. I tried =countif(e3:e55,"="&f3) and it just gives me zero.

What I'm counting is how many of the dates in column E are the same as their counterpart in column F.