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

MakeUseOf: 8 Google Sheets Formulas That Make Work So Much Easier (Even If You Hate Spreadsheets). “Spreadsheets are supposed to save time, but sometimes they just make things messier. I hated digging through endless menus until I found a handful of formulas that do the heavy lifting for me.” I loooove CONCATENATE.

https://rbfirehose.com/2025/08/02/makeuseof-8-google-sheets-formulas-that-make-work-so-much-easier-even-if-you-hate-spreadsheets/

MakeUseOf: 8 Google Sheets Formulas That Make Work So Much Easier (Even If You Hate Spreadsheets) | ResearchBuzz: Firehose

ResearchBuzz: Firehose | Individual posts from ResearchBuzz