I have spreadsheet: https://docs.google.com/spreadsheets/d/19GrXAFLpv6jz9OzDum-fyfP_m-RZFCNrQ0rr1vd5bYI/edit?usp=sharing

I want to count percent of wins(W) in C column and write it to C1 cell. I plan to add many rows.

I know VBA little bit, but not found how to use it inside Spreadsheet.

How to use VBA there?

And how to do this with fuction button?


1 Answer 1


There is no need of something similar to VBA as the percentage could be calculate by using built-in functions.

The column C has values L or W. To calculate the percentage of W use the following formula in C1:

  • COUNTIF(C3:C,"W") counts cells from C3 to the last cell in column C with W.
  • COUNTA(C3:C) counts all the cells from C3 to the last cell in column C with any alphabetic value.

To display the result as percentage apply the % format.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.