Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: countif

  1. #1
    New Member
    Join Date
    Apr 2002
    Posts
    6
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    if you have a range of numbers running down in order, how can you use above formula to see when that number changes, so e.g if you have 1,1,1,1,2,2,2,3,3,3 and you only want to know how many different numbers you have e.g 3

  2. #2
    MrExcel MVP Aladin Akyurek's Avatar
    Join Date
    Feb 2002
    Location
    The Hague, NL
    Posts
    84,042
    Post Thanks / Like
    Mentioned
    38 Post(s)
    Tagged
    8 Thread(s)

    Default

    On 2002-05-06 02:57, ROBERT MARCHETTI wrote:
    if you have a range of numbers running down in order, how can you use above formula to see when that number changes, so e.g if you have 1,1,1,1,2,2,2,3,3,3 and you only want to know how many different numbers you have e.g 3
    For a range with no blanks and of numeric type, you can use:

    =SUM(IF(FREQUENCY(A1:A15,A1:A15)>0,1))

    otherwise you need an array-formula:

    =SUM(IF(LEN(A1:A15),1/(COUNTIF(A1:A15,A1:A15))))

    Aladin

  3. #3
    New Member
    Join Date
    Apr 2002
    Posts
    6
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    thanks 1st works perfect!

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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