Sum(Countifs( ... use cell reference instead of Text in constant array .....

spydey

Active Member
Joined
Sep 19, 2017
Messages
314
Office Version
  1. 2013
Platform
  1. Windows
I have some text in cells A3:A6.

The text is:

Testing1
Testing2
Testing3

I have a Sum(Countifs( formula in cell B7.

The formula is:

=Sum(Countifs(CriteriaRange1,{"Testing1","Testing2","Testing3"},CriteriaRange2, Criteria2, etc. etc.))

I would like to reference the cells in my array instead of having to type out the text.
The text in the cells can change from time to time and having to change the formula each time is a nuisance and a waste of time.
Simply changing the text in the cells would be much simplier.

Something like:

=Sum(Countifs(CriteriaRange1,{$A$3,$A$4,$A$5},CriteriaRange2, Criteria2, etc. etc.))

Is that possible?

I have tried and only getter a message saying that I have input my formula incorrectly.

Thoughts? Ideas?

Maybe I should use SumProduct?????

-Spydey
 
Last edited:

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Try:

=Sum(Countifs(CriteriaRange1,$A$3:$A$5,CriteriaRange2, Criteria2, etc. etc.))

and confirm with Control+Shift+Enter.
 
Upvote 0
Try:

=Sum(Countifs(CriteriaRange1,$A$3:$A$5,CriteriaRange2, Criteria2, etc. etc.))

and confirm with Control+Shift+Enter.

Thanks Eric!

I will give that a try. I thought that I already tried a CSE input and wasn't successful, but maybe I did something incorrectly.

I will try again.

-Spydey
 
Upvote 0
@Eric W

Thanks Eric!!

Totally worked.

I don't know why it didn't when I initially tried to enter a CSE array ... hmmmm, I must have missed something.

Thanks again for the quick response!!

-Spydey
 
Upvote 0
Glad it worked for you! Remember that you can have as many single conditions as you want, but a maximum of 2 group conditions, and if you have 2 groups, one must be vertical and one must be horizontal. A3:A5 and B3:D3 for example.
 
Last edited:
Upvote 0
I don't know why it didn't when I initially tried to enter a CSE array ... hmmmm, I must have missed something.

It's probably because you enclosed your reference within curly braces (ie. {$A$3,$A$4,$A$5} ), as you indicated in your original post. By the way, you can avoid having to confirm the formula with CONTROL+SHIFT+ENTER by replacing SUM with SUMPRODUCT.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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