| |

VerySource

 Forgot password?
 Register
Search
View: 1810|Reply: 3

In excel, how to count the number of "A" in n cells (horizontal) starting from a certain cell

[Copy link]

1

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-2-1 15:00:01
| Show all posts |Read mode
When I use excel, I want to count the number of 'A' in n horizontal cells starting from A1, but there seems to be no suitable function. Although the COUNT function can be calculated, I need to write a clear range, such as from A1 : H1, I want to know, if I don't know the certain range, what should I do based on the value entered by the user?
Reply

Use magic Report

0

Threads

5

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

Post time: 2020-3-16 19:30:01
| Show all posts
Use countif to see
= COUNTIF (A1: H1, "A")

But this method can only be applied to statistics where one cell contains only one A.
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 Japan

Post time: 2020-3-24 09:15:01
| Show all posts
I want to know, if I don't know the certain range, what should I do based on the value entered by the user?
-------------------------------------------------- ----
Without VBA, you can specify operations for specific rows.
Change the method provided bywzqiiiiiito
= COUNTIF (1: 1, "A")
Just fine.

By the way, in Excel 2003, each sheet can only have a maximum of 256 columns (the column name is IV) or 65536 rows, so it can be written like this
= COUNTIF (A1: IV1, "A")
I just tried it by the way, = COUNTIF (A1: IV1, "A") will be automatically converted to = COUNTIF (1: 1, "A")
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-4-13 02:45:01
| Show all posts
If I do n’t know the determined range, it should be determined based on the value entered by the user
=============================================
Suppose the user can enter the range of cells (the first row) the user needs in cell A2, and display the result in B2:

= COUNTIF (INDIRECT (A2), "A")

If you enter in cell A2: A1: A5
Then the result of the formula is the number of A in cell range A1: A5
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list