+ Reply to Thread
Results 1 to 6 of 6

HELP: How to count how many times a numbers follows another?

  1. #1
    Registered User
    Join Date
    03-24-2022
    Location
    Hungary
    MS-Off Ver
    365
    Posts
    50

    Question HELP: How to count how many times a numbers follows another?

    Hello everyone!

    I have a little problem and my excel skills are weak for this.
    So, I have a great range of data (it doesn't matter if it is in a row or in a column) 5 7 2 4 2 14 0 1 2 3 1 1 0 19...... And I want to count how many times a number follows another like 1 follows 1 or 0 follows 19. It is really important to have the specific order so 0 follows 1 is not equal to 1 follows 0. I need a formula where I can just change the two numbers to work with every combination.
    I hope it is undertandable, and someone can help me.
    Thank you so much!

    Tamás

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: HELP: How to count how many times a numbers follows another?

    One way:

    =SUMPRODUCT((A1:A23=C1)*(A2:A24=E1))
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Registered User
    Join Date
    03-24-2022
    Location
    Hungary
    MS-Off Ver
    365
    Posts
    50

    Re: HELP: How to count how many times a numbers follows another?

    Thank you Glenn,
    It is seams like working very well!
    Is there any way to skip cells that contains no number?

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: HELP: How to count how many times a numbers follows another?

    I am assuming that your Excel version means that you have O365... and have access to the FILTER function.


    =LET(a,A1:A23,b,A2:A24,SUMPRODUCT((FILTER(a,a<>"")=C1)*(FILTER(b,b<>"")=E1)))
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    03-24-2022
    Location
    Hungary
    MS-Off Ver
    365
    Posts
    50

    Re: HELP: How to count how many times a numbers follows another?

    Thank you, it is working like wonders!

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: HELP: How to count how many times a numbers follows another?

    You're welcome.



    It would be very nice if you were to just click the Add Reputation button at the foot of any of the posts of members who helped you reach a solution.

    Finally, if that takes care of your original question, please select "Thread Tools" from the menu link (just above the first post in the thread) and mark this thread as SOLVED.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 1
    Last Post: 11-10-2015, 07:51 AM
  2. Count numbers of times within hours
    By dreicer_Jarr in forum Excel General
    Replies: 3
    Last Post: 06-24-2015, 09:49 PM
  3. [SOLVED] HELP: Count for how many times two numbers appears together ?
    By Mr.Nob0OOdy in forum Excel Formulas & Functions
    Replies: 29
    Last Post: 02-10-2013, 06:32 AM
  4. [SOLVED] Count the total number of times several numbers appear on each row
    By dwontheweb in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 11-28-2012, 12:11 AM
  5. Count the number of times two numbers appear together
    By gsemaan in forum Excel General
    Replies: 1
    Last Post: 04-22-2011, 01:24 PM
  6. RE: Count numbers of times workbook opened
    By Jim Thomlinson in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-23-2006, 09:20 AM
  7. Count # of times a range of numbers appear
    By nockam in forum Excel General
    Replies: 1
    Last Post: 03-22-2005, 07:21 PM

Tags for this Thread

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