title: Counting cells that match a value from value in another cell
body: <p>I am really unfamiliar with Excel, but I stumbled upon a project where I am required to use it, so any kind of feedback would be much appreciated.</p>
  <p>I have a csv file that has the filename, time and result, and it looks something like this.
  <a href="https://i.stack.imgur.com/GiR7P.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GiR7P.png" alt="enter image description here" /></a></p>
  <p>On an external excel file I am required to calculate the average of the time(on column B) and the number of cells where the file name matches the result(data on column A without the &quot;.jpg&quot; and column C)</p>
  <p>I currently have succeeded in calculating the average with the command below</p>
  <p>=AVERAGE('file:///usr/local/elanpr-src/plateRecognitionResult.csv'#$plateRecognitionResult.B1:B100)</p>
  <p>And I have tried calculating the number of cells that match with the following command, but seems to run into an error.</p>
  <p>=COUNTIF(SUBSTITUTE('file:///usr/local/elanpr-src/plateRecognitionResult.csv'#$plateRecognitionResult.A1:A100, &quot;.jpg&quot;, &quot;&quot;),'file:///usr/local/elanpr-src/plateRecognitionResult.csv'#$plateRecognitionResult.C1:C100)</p>
  <p>It would be appreciated if anyone could tell me what I am doing wrong and what I can do to fix this.</p>
  <p>Thank you in advance!!</p>