What is wrong with my excel 365?

Perry Cheng

New Member
Joined
May 25, 2021
Messages
25
Office Version
  1. 365
Platform
  1. Windows
So, I am trying to use either VLOOKUP or simple Countif and if I have an array of list, it only look up the first on the list? What am I doing wrong?

=COUNTIF(B2,$E$2:$E$3)


Column BColumn CColumn DColumn E
Tom
=COUNTIF(B2,$E$2:$E$3)​
Mary
Mary
0​
John
Jane
0​
Jack
0​
John
0​
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
OK, I think my thought process may be reversed. The range look up list in Column E should have go first!?? Weired)
 
Upvote 0
Hi & welcome to MrExcel.
Your countif would need to be
Excel Formula:
=SUM(COUNTIF(B3,$E$2:$E$3))
or another option
Excel Formula:
=ISNUMBER(XMATCH(B2,$E$2:$E$3))+0
 
Upvote 0
With 365, try
Excel Formula:
=COUNTIF(E2:E3,B2:B6)
Manexcel.xlsx
BCDE
2Tom0Mary
3Mary1John
4Jane0
5Jack0
6John1
Sheet4
Cell Formulas
RangeFormula
C2:C6C2=COUNTIF(E2:E3,B2:B6)
Dynamic array formulas.
 
Upvote 0
Jason, so actually I am trying to figure out something like this, but has been struggling.

BCD (List)
Tom, Mary, Jane=COUNTIF VALUES IN THE LIST IS IN COLUMN B?Mary
John, Edith, KarenJohn
Mike, Cecil, Jane

This should not be that difficult. I must be have a brain freeze moment.

I tried, =COUNTIF(B2:B6, "*"&D2:D3&"*") but it fails. WHY??
 
Upvote 0
How about
+Fluff 1.xlsm
BCD
1BCD (List)
2Tom, Mary, Jane1Mary
3John, Edith, Karen1John
4Mike, Cecil, Jane0
5Tom, Mary, John2
Master
Cell Formulas
RangeFormula
C2:C5C2=SUM(COUNTIFS(B2,"*"&$D$2:$D$3&"*"))
 
Upvote 0
See I did exactly what you did and my excel is giving me all "0"

=SUM(COUNTIFS(B2,"*"&$D$2:$D$3&"*"))
 
Upvote 0
I am wondering if there is something wrong with my excel program?? Very strange.
 
Upvote 0
I think the problem I am discovering is the Range thing is not working. If it is a single cell comparison, it works.

If it were just "*"&$D$2&"*" it works, but when I do "*"&$D$2:$D$3&"*" it fails.
 
Upvote 0
Check that you don't have any leading/trailing spaces or other hidden characters in d2:d3
 
Upvote 0

Forum statistics

Threads
1,223,627
Messages
6,173,417
Members
452,514
Latest member
cjkelly15

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