Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

please give me the complete code for me to copy and paste in order to get the results in column B. please note that my actual spreadsheet contains a lot more than just 3 different variables for column A. thank you very much Nathaniel

1 A B
2 Country count of occurance 3 USA 3 4 Canada 2 5 Mexico 1 6 USA 3 7 Canada 2 8 USA 3

share|improve this question

migrated from Nov 2 '10 at 11:35

This question came from our site for professional and enthusiast programmers.

Look at the help for the countif function. You can use =countif(range, "USA") for static values to count of =countif(range, A1) to count whatever is in cell A1.

share|improve this answer

You must log in to answer this question.