+ Reply to Thread
Results 1 to 12 of 12

formula Counta

  1. #1
    Registered User
    Join Date
    07-12-2006
    Posts
    54

    Cool formula Counta

    Using H1=COUNTA(F:F)/COUNTA(E:E) works fine if the formula is in a different column other than F or E. If the formula is placed on column E1 the result is 0. What changes are needed to make it work under the same column?

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,482
    Quote Originally Posted by tangomj
    Using H1=COUNTA(F:F)/COUNTA(E:E) works fine if the formula is in a different column other than F or E. If the formula is placed on column E1 the result is 0. What changes are needed to make it work under the same column?
    just a thought,
    if you place the formula in E1 then you need to say E2:E65536

  3. #3
    Registered User
    Join Date
    07-12-2006
    Posts
    54
    that works for me. thanks.

    Now I have:
    =COUNTA(C$3:C$6536)/COUNTA($B$3:$B$65536)

    Next step:
    Within the data range (column B) all cells without a value will have a "*" instead of a blank. All cells outside the data range (column B) will be blank. How can I use the above formula while excluding all "*" and blank cells in the total count?

  4. #4
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885
    You can try:

    =IF(OR(B3="*",B3=""),"",COUNTA(C$3:C$6536)/COUNTA($B$3:$B$65536))

    If B3 is * or blank, then the formula won't show any result. If it's not either of those then it will perform your division.

  5. #5
    Registered User
    Join Date
    07-12-2006
    Posts
    54
    I get a FALSE only. Here's my column C data:

    25
    58
    *
    36
    *
    14
    68
    *
    98
    <blank>
    ..... <blank>

    How do I do COUNTA with the numerial values while excluding the * and blanks? Column B is donimator. Column C is the numerator. Dynamic data is on column C.

  6. #6
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885
    Can you please upload a spreadsheet with some sample data as you would be working with it. Earlier you said *'s and blanks would be in column B, now they're in column C?

  7. #7
    Registered User
    Join Date
    07-12-2006
    Posts
    54
    I've attached the file with an example. I'm still getting a FALSE result instead of a percentage.
    Attached Files Attached Files

  8. #8
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    Try this formula in B1 copied across to C1 and D1

    =COUNT(B3:B1000)/COUNT($A3:$A1000)

  9. #9
    Registered User
    Join Date
    07-12-2006
    Posts
    54
    Thanks. Simple solution.

  10. #10
    Forum Contributor
    Join Date
    03-03-2007
    Posts
    101

    CountA with a named range

    Does anyone know why the =CountA function doesn't work with named ranges. For example, let's say the data is in cells A1:A10 and we name that range "Range1", the following counta function doesn't work.

    =COUNTA(Range1)

    but the following does work

    =COUNTA(A1:A10)

  11. #11
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    Works for me.....in what way doesn't it work?

  12. #12
    Forum Contributor
    Join Date
    03-03-2007
    Posts
    101

    I was wrong

    Sorry about that. I got =count confused with =countA

    Thanks

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1