Indirect function with array

tiredofit

Well-known Member
Joined
Apr 11, 2013
Messages
1,834
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Can someone please explain what this formula is doing?


Code:
=SUM(COUNTIF(INDIRECT({"a1","b","c1"}),apples))


I thought apples was a named range in the workbook but I can't find it.


Thanks
 
Last edited:

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
From sheet a1, b and c1 it will count how many times the word apples is mentioned.
or something that direction xd or it could be columns, idk never use indirect
 
Last edited:
Upvote 0
Have you looked in the Name Manager?
 
Upvote 0
Unless the formula returns a #NAME error, it must be a defined name.
 
Upvote 0
Upvote 0
If I array enter that formula and then use Evaluate Formula on it this is what I get after the 2nd step.

SUM(COUNTIF({#VALUE !,#VALUE !,#VALUE !},#NAME?))

The next step shows this,

SUM({0,0,0})

and the final step this.

0
 
Last edited:
Upvote 0
My mistake - I had forgotten that COUNTIF would treat the #NAME error as a text criterion rather than returning it as an error.
 
Upvote 0

Forum statistics

Threads
1,215,066
Messages
6,122,948
Members
449,095
Latest member
nmaske

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