Share via

Why Excel COUNTIF does not accept an Array Input?

Anonymous
2017-11-26T22:59:55+00:00

I am puzzled at this. I thought a very simple function like COUNTIF in Excel 2013 should be able to accept Array input, but it gives syntax error.

Try this formula =countif({1,2,3,4},2) and press CTRL + SHIFT + ENTER to create an array formula.

Excel fails to understand this formula and displays a message box.

Does anyone know why? Is there something I am missing here?

Moved from: Office / Excel / Windows other / Office 2013

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Anonymous
    2017-11-28T14:56:53+00:00

    Can you give your real-world use case? I've never tried what you are asking, but I suspect there are easier ways to accomplish your goal.

    You don't have to enter {1,2,3,4} as an array formula for Excel to view it as an array [try using   =Count({1,2,3,4})   in a cell to verify, it should return a value of 4 without being entered with Ctrl/Shift/Enter].

    Was this answer helpful?

    0 comments No comments