jspreadsheet / jspreadsheet/ce

COUNTIF doesn't work if criteria contains a digit

Open
#1,635 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
7.2k
Forks
890
PR merge metrics
No merged PRs in 30d

Description

Try this:

=COUNTIF([A1:E1],"A")

it works, but this does not:

=COUNTIF([A1:E1],"A3")

I'm trying different combinations, it always fails if criteria contains a digit, wherever it's in the string.
Any clue?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the two COUNTIF formulas in the spreadsheet grid and compare the results for criteria with and without digits. Trace the COUNTIF handling to identify where criteria such as "A3" fails. Done means COUNTIF matches criteria containing digits as well as criteria containing only letters.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.