COUNTIF based on few different criteria

NormChart55

New Member
Joined
Feb 22, 2022
Messages
44
Office Version
  1. 2016
Platform
  1. Windows
Hello All,

I am trying to figure out a formula to count if cell data exists in a column based on 2 criteria on 1 tab, and looking up into tab 2 and having trouble. Details on what I am trying to do below. I appreciate any assistance that is provided. Let me know if the below makes sense.

Formula somewhere in 'X Tab'
'X tab'
Criteria 1 Cell D668
Criteria 2 Cell AD680

'Y Tab"
Criteria 1 Cell D668 from 'X Tab' data is present in some row of column C. This cell data from the 'X Tab' would be variable and change and would need to find which row it would be in each time.
Need to count if Criteria 2 Cell AD680 from 'X Tab' shows up in a column across this row.
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
NEVERMIND. Correctioncoming.
 
Last edited:
Upvote 0
Sorry, I could not get the correction in soon enough:
But try this, assuming your data for the second part (sheet Y) starts in COLUMN D, and you have no more than 1000 rows in sheet Y.
(if not adjust accordingly)

Excel Formula:
=SUM((D668=Y!C1:C1000)*(AD680=Y!D1:Z1000))


This gives a count, not a location.
 
Upvote 0
Sorry, I could not get the correction in soon enough:
But try this, assuming your data for the second part (sheet Y) starts in COLUMN D, and you have no more than 1000 rows in sheet Y.
(if not adjust accordingly)

Excel Formula:
=SUM((D668=Y!C1:C1000)*(AD680=Y!D1:Z1000))


This gives a count, not a location.
Thank you. The first solution you provided got me what i needed in the end. Ultimately I just needed it to return something other than an error if the criteria was met, and I could do a filter based on that. So I did an error statement with it and boom. I really appreciate the help, I have achieved what I wanted.
 
Upvote 0
Okay, well, that solution was very clunky, which is why I wanted to correct it. But, I'm happy it worked out.


Best Wishes!
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,161
Members
453,021
Latest member
Justyna P

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