COUNTIFS Function using Named Ranges

Gesyca_is_joy

Board Regular
Joined
Apr 24, 2014
Messages
90
Office Version
  1. 365
Platform
  1. Windows
I am trying to create a COUNTIFS Function in Excel 2007.
Essentially what i have is a named range, for the example we will say i named it "NATO". the function I am trying to write is
a count is does not equal "NATO" and equals yes. Here is a copy of the live formula (referencing tables with values in it, but hopefully you get the idea.

=COUNTIFS(I_RMCM_OPEN[Sub Vendor],"<>"&SubNames,I_RMCM_OPEN[SLA],"Overdue")

when i try it in my live document i get no returns, no errors but no returns. I am wondering what i did wrong. is the formula not evaluating the 4 text stings in the named range individually?

In this example, the first four values are the values of the named range "NATO" therefore if i were fun this function i should get a count of 1 because "tango" is not one of the values in the named range and it also equals "yes"
alphayes
bravono
Charlieyes
Deltano
tangoyes

<TBODY>
</TBODY>
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Maybe something like this



A

B

C

D

1

Values​

Yes/No​

Count​

2

alpha​

yes​

1​

3

bravo​

no​

4

Charlie​

yes​

5

Delta​

no​

6

7

tango​

yes​

<TBODY>
</TBODY>


Formula in D2
=SUMPRODUCT(--ISNA(MATCH($A$2:$A$7,NATO,0)),--(B2:B7="Yes"))

Hope this helps

M.
 
Upvote 0
the values are on a separate table from the fourmula, although the range is on the same tab, they were only in a singular table in the example so that the example made a little more sense.
 
Upvote 0
the values are on a separate table from the fourmula, although the range is on the same tab, they were only in a singular table in the example so that the example made a little more sense.

The post above is just an example. Try to adapt it to your real case.

Or, please, post a real data sample, say 10 rows, and expected result.

M.
 
Upvote 0
ok so i don't know how to send an image for you to look at. but on one tab i have a table array named "MONTH" within that table is 8 columns, for the purposes of this exampl only the first and last matter.

the first is a list of su vendor names and the last is a formula that returns a value of "In SLA", "Overdue" or "No SLA". the first column could be blank but the last column will always have a value.

On a separate tab I have a table where I want to see the sum total of how many Overdue entries each sub vendor has. I have 4 big subvendors then a 5 which will be everyone else lumped together. that 5th one is where i need the formula we are talking about. I want a count of how many rows have a value in the sub vendor column that does not equal one of my four names and also has the value "overdue" in the last column, does that make a little more sense?

Sub VendorInfoInfoInfoInfoDate1Date2SLA Formula
ABCIn SLA
DEFOverdue
GHINo SLA
In SLA
123Overdue
ABCOverdue
DEFOverdue

<TBODY>
</TBODY>
 
Upvote 0
Say you have a named range SubVendor that contains
ABC
DEF
GHI
KLM

and your table MONTH, in another sheet, is like this



A

B

C

D

E

F

G

H

1

Sub Vendor​

Info1​

Info2​

Info3​

Info4​

Date1​

Date2​

SLA Formula​

2

ABC​

In SLA​

3

DEF​

Overdue​

4

GHI​

No SLA​

5

In SLA​

6

123​

Overdue​

7

ABC​

Overdue​

8

DEF​

Overdue​

9

345​

Overdue​

10

678​

Overdue​

<TBODY>
</TBODY>



Try this formula

=SUMPRODUCT(--ISNA(MATCH(MONTH[Sub Vendor],SubVendor,0)),--(MONTH[SLA Formula]="Overdue"))

that results in 3 considering the table above.

Hope this helps

M.
 
Upvote 0
Ok, i just ran it live and it is pulling fields that don't have a value in the Subvendor field, how do i fix that? I need the formula to only look at rows where the sub vendor has a value but doesn't equal the names in my named range. I can add a column as well to pull items that are overdue with no value in the subvendor field, but that function is simple and I am pretty sure I can figure it out on my own. :)
 
Last edited:
Upvote 0
Ok, i just ran it live and it is pulling fields that don't have a value in the Subvendor field, how do i fix that? I need the formula to only look at rows where the sub vendor has a value but doesn't equal the names in my named range. I can add a column as well to pull items that are overdue with no value in the subvendor field, but that function is simple and I am pretty sure I can figure it out on my own. :)

Maybe...

=SUMPRODUCT(--ISNA(MATCH(MONTH[Sub Vendor],SubVendor,0)),--(MONTH[SLA Formula]="Overdue"), --(MONTH[Sub Vendor]<>""))

M.
 
Upvote 0

Forum statistics

Threads
1,215,431
Messages
6,124,855
Members
449,194
Latest member
HellScout

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