I have this data in my Google Spreadsheet which you can see on the image. Now please notice the column "F", you will see the same data "W" or "L" multiple times. What I want to do is to count the "W" or "L" that is only before that black cell. Now that cell is fully colored with black but there is string value behind it which is "test". Basically, on that column I want to keep a count of either "W"s or "L"s that is only before that black cell basically the first instance. I want to know how can I find this out using Google Sheets formulas.


  • Welcome! You didn't specify in what form you want to get these values. Perhaps you meant something like ={"Win", "Loss";COUNTIF(INDIRECT("$F$2:$F$"&MATCH("test",$F$2:$F,0)-1),"W"),COUNTIF(INDIRECT("$F$2:$F$"&MATCH("test",$F$2:$F,0)-1),"L")}?
    – JohnSUN
    Sep 2 at 11:45
  • Nvm @JohnSUN I got the solution Sep 3 at 12:03
  • Glad you found a solution, Tech And Gaming. How about posting an answer to you own question so that you can help others who may have a similar problem in the future.
    – Tedinoz
    Sep 5 at 5:47


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.