Use the COUNTIF function in Excel to calculate the percentage above 25 years of age

Source: Internet
Author: User

Suppose the age is in column A, you can use the following company (if it is not included 25 years old, you can take that = remove it.)

=countif (A1:an, ">=25")/countif (A1:an, ">0")

When you enter a formula, you set the cell format to a percentage.

If you are not sure to use the Counif function, you can use the following formula:

=countif (A1:an, ">=25")/count (A1:an)

The above n is the natural number, which is modified according to the specific number of rows.

How do you use the COUNTIF function in Excel to calculate the number of values in a selected range how do you apply a formula to a different cell before the selection changes?

For example, I'm going to calculate the number of values in an area =countif (D6:D21,G6) But if I pull the formula down and compute the number of the other number in the same region, the selection automatically follows one line of results into =countif (D7:D22,G7). So now I want the d6:d21 in parentheses to be the same, what should I do?

=countif (D$6:D$21,G6), if G6 also need to be fixed to g$6

$ is an absolute reference symbol, plus this match the cell is fixed when the formula is dragged.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.