I have the following data on sheet 2
Name
Mark Jacob
James Smith
On sheet 1 I have a name column in column a and i want to count the total number of times the name in column a appears in the name column on sheet 2. Like so:
Name Total Mark Jacob 1 Harry Potter 0
I am using the following countif function:
=COUNTIF('Sheet2'!K:K,"*"&"A2"&"*")
For some reason however my value always returns 0
However if I replace my Cell reference A2 from my function with 'Mark' this gives me a result of 1. Why is this?
Please can someone show me where I am going wrong? Thanks