Count in a Col depending on another column?

HuskyJones

New Member
Joined
Sep 30, 2015
Messages
31
Hi Folks
Having a brain fart......
On my "counts" sheet I want to get the number from a column in my KCPs sheet but only to be counted if cells another column in KCPs contains a specific value (T1).....
I thought this
=COUNTIFS(KCPs!$H$2:$H$10000,"T1",KCPs!$K2:$K10000,<>"")

(My K column is weight, My H column is Type and i want a count of T1 with weight, then i'll repeat for T2)

I know my brain is farting but can't see it for looking :mad:

Thanks ever knowing peeps (y)
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
68,031
Office Version
  1. 365
Platform
  1. Windows
ADVERTISEMENT
The issue is with your last argument.
Try:
Code:
[COLOR=#333333]=COUNTIFS(KCPs!$H$2:$H$10000,"T1",KCPs!$K2:$K10000,[/COLOR][COLOR=#ff0000]"<>"[/COLOR][COLOR=#333333])[/COLOR]
If you are looking the for specific value "T1", use quotes around that.
If you are looking for the value in cell T1, leave the quotes off. It doesn't matter if T1 is hard-coded or a formula, as long as it is not returning an error in that cell.
 
Last edited:
Upvote 0

HuskyJones

New Member
Joined
Sep 30, 2015
Messages
31
the issue is with your last argument.
Try:
Rich (BB code):
=countifs(kcps!$h$2:$h$10000,"t1",kcps!$k2:$k10000,"<>")
if you are looking the for specific value "t1", use quotes around that.
If you are looking for the value in cell t1, leave the quotes off. It doesn't matter if t1 is hard-coded or a formula, as long as it is not returning an error in that cell.

thank you joe you are my saviour!!!!!
 
Upvote 0

AlanY

Well-known Member
Joined
Oct 30, 2014
Messages
4,476
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
deleted
 
Last edited:
Upvote 0

Forum statistics

Threads
1,195,633
Messages
6,010,818
Members
441,569
Latest member
PeggyLee

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
Top