COUNTIF in array formula isn't allowed, while COUNT is. Why ?

szakharov7723

Board Regular
Joined
Jun 22, 2018
Messages
85
Office Version
  1. 2019
Platform
  1. Windows
Can you please help me find a way around

Can't figure out why this one working:
Code:
{=COUNT(ISNUMBER(SEARCH(List,E522))*(ROW(List)-1))}
Which evaluates in something like
Code:
COUNT({2,4,6,2})
. And it results in 4

Now I want to count only 2. So I use:
Code:
{=COUNTIF((ISNUMBER(SEARCH(List,E522))*(ROW(List)-1)),2)}

But this one doesn't work ?? Not even letting me execute this formula ?
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
I think it's failing because countif does not work on an array, only ranges.
This should work

Code:
{=SUM(IF({your_array}=2,1,0))}

It seems to work without being an array formula too but I'm not sure how excel is set up in that regard across versions
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,891
Messages
6,175,229
Members
452,621
Latest member
Laura_PinksBTHFT

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top