Countifs based on 'contains' but references a cell in table

Melimob

Active Member
Joined
Oct 16, 2011
Messages
396
Office Version
  1. 365
Hi I have the below formula

I basically want to count if the country in my current table appears within text in my country column in table1
Also since I want to absolute reference the PM, I've use $C$2 as I didn't know how to absolute reference the cell in a table if I just clicked on it. It would appear as ,[@Country] but then would try and move to next row if I copied down the formula.


=COUNTIFS(Table1[Country],"*[@Country]*",Table1[PM],$C$2)

I also want to use a similar count but add in a 3rd argument based on date which would be referenced on header row of both columns

thanks for any advice
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Hi I have the below formula

I basically want to count if the country in my current table appears within text in my country column in table1
Also since I want to absolute reference the PM, I've use $C$2 as I didn't know how to absolute reference the cell in a table if I just clicked on it. It would appear as ,[@Country] but then would try and move to next row if I copied down the formula.


=COUNTIFS(Table1[Country],"*[@Country]*",Table1[PM],$C$2)

I also want to use a similar count but add in a 3rd argument based on date which would be referenced on header row of both columns

thanks for any advice

OK got the 1st to work but had to reference range cell instead of table name

=COUNTIFS(Table1[Country],"*"&D3&"*",Table1[PM],$C$2)

now going to try and add in 3rd match
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,170
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