+ Reply to Thread
Results 1 to 10 of 10

Counting multiplicative/divisible pairs and consecutive numbers from rows

  1. #1
    Registered User
    Join Date
    06-27-2020
    Location
    UAE
    MS-Off Ver
    2013
    Posts
    50

    Post Counting multiplicative/divisible pairs and consecutive numbers from rows

    Dear Excel Experts,
    Can someone please help me in providing a formula that counts multiplicative/divisible pairs and consecutive numbers from rows.
    I have attached the file for easy reference
    Thanks in advance
    Attached Files Attached Files

  2. #2
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: Counting multiplicative/divisible pairs and consecutive numbers from rows

    Some possible options, if I've understood the requirement - please refer "notes" re: differences versus your expected results.

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by XLent; 06-29-2020 at 09:03 AM.

  3. #3
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: Counting multiplicative/divisible pairs and consecutive numbers from rows

    I have changed the 'multiplicative pairs' approach, below, to avoid false positives (I hope); I have also modified the others to include a handler, of sorts.

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    06-27-2020
    Location
    UAE
    MS-Off Ver
    2013
    Posts
    50

    Re: Counting multiplicative/divisible pairs and consecutive numbers from rows

    Thanks for a quick response. looks there is an error on counting first digits. For instance, when i type numbers like 13, 14,15, 222, 2222, 22222, 258 and the result is showing 6 instead of 4.
    Thanks you
    Last edited by AliGW; 07-01-2020 at 07:10 AM. Reason: Please don't quote unnecessarily!

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,830

    Re: Counting multiplicative/divisible pairs and consecutive numbers from rows

    Attach a workbook that shows the error so that we can troubleshoot.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  6. #6
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: Counting multiplicative/divisible pairs and consecutive numbers from rows

    try below --- dawned on me that the test for strings of len 2:15 is pointless as you need only test left most character

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    06-27-2020
    Location
    UAE
    MS-Off Ver
    2013
    Posts
    50

    Re: Counting multiplicative/divisible pairs and consecutive numbers from rows

    thanks, working but taking very long time if the rows are more than a million. is it possible to modify the following formula which is without array; =IFERROR(SUMPRODUCT(--(LEFT($C21:$I21,1)+0=MODE(LEFT($C21:$I21,1)+0))),"")
    Last edited by AliGW; 07-01-2020 at 08:57 AM. Reason: Please don't quote unnecessarily!

  8. #8
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: Counting multiplicative/divisible pairs and consecutive numbers from rows

    SUMPRODUCT is no more efficient than an Array (sometimes less so), and to do what you want your best option is to use FREQUENCY.

    Of course, if you're running these calcs over a million rows then it's debatable as to whether or not you should be using XL in first instance.

    Regardless, assuming you continue with XL, to do this efficiently you would be best served using helper matrices - this would allow you to avoid Array type calculations altogether.

  9. #9
    Registered User
    Join Date
    06-27-2020
    Location
    UAE
    MS-Off Ver
    2013
    Posts
    50

    Re: Counting multiplicative/divisible pairs and consecutive numbers from rows

    fear enough, thanks a looooot for the effort and great support
    Last edited by AliGW; 07-01-2020 at 08:57 AM. Reason: Please don't quote unnecessarily!

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,830

    Re: Counting multiplicative/divisible pairs and consecutive numbers from rows

    Administrative Note:

    Please don't quote whole posts, especially when you are responding to the one immediately preceding your own - it's just clutter. It's OK to quote if you are responding to a post out of sequence, but limit quoted content to a few relevant lines that makes clear to whom and what you are responding. Thanks!

    For normal conversational replies, try using the QUICK REPLY box below or the REPLY button instead of REPLY WITH QUOTE.

+ 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. [SOLVED] Consecutive & Multiplicative =IF statement
    By Bellefeu in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-28-2018, 05:06 AM
  2. Counting consecutive numbers in excel
    By kurtvon in forum Excel General
    Replies: 3
    Last Post: 05-02-2016, 03:38 PM
  3. Counting Consecutive Numbers
    By RO24 in forum Excel General
    Replies: 2
    Last Post: 10-19-2015, 02:30 PM
  4. Counting consecutive repeated numbers greater than or less than.
    By fatterthanelvis in forum Outlook Formatting & Functions
    Replies: 5
    Last Post: 12-16-2014, 11:09 PM
  5. re: counting consecutive numbers
    By bismo in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-10-2013, 04:55 PM
  6. counting only consecutive numbers over 11
    By sgk18 in forum Excel General
    Replies: 5
    Last Post: 01-30-2012, 05:16 AM
  7. Counting Match Pairs In Rows
    By bmb2200 in forum Excel Formulas & Functions
    Replies: 67
    Last Post: 09-06-2005, 09:05 PM

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