+ Reply to Thread
Results 1 to 20 of 20

counting double

  1. #1
    Banned User!
    Join Date
    09-04-2018
    Location
    cyprus
    MS-Off Ver
    2007
    Posts
    282

    counting double

    can we modified the formula that counts doubles but we don’t count doubles of the same number.so is is 11222 should count 0, if is 112222zero again like the example on spread sheet.
    thanks a lot!

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,716

    Re: counting double

    In what way does this differ from your original query?

    https://www.excelforum.com/excel-gen...t-occur-s.html
    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. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Banned User!
    Join Date
    09-04-2018
    Location
    cyprus
    MS-Off Ver
    2007
    Posts
    282

    Re: counting double

    if is 112222 count zero, i want the formula to count only that event 112211221122 ,,please see attachment.again thanks

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,716

    Re: counting double

    I have looked at the attachment. Please explain in words how this is different to your original query that I linked to above.

    EDIT: OK - I see the difference now. Sorry!
    Last edited by AliGW; 01-01-2019 at 09:08 AM.

  5. #5
    Banned User!
    Join Date
    09-04-2018
    Location
    cyprus
    MS-Off Ver
    2007
    Posts
    282

    Re: counting double

    lets get the idea: if outcome is 22 count 1,if next number is 2 like 222 count 0 again ,if next number was 1 like 221 count 1(like keep count the previous double).
    if outcome is now 2222 count 0, if 2212 count 0, if outcome is 221122 count 3 yes?, if outcome 22112 count 2 (keep the count of previous 2 double)
    can you help?
    Last edited by louis128; 01-01-2019 at 09:48 AM.

  6. #6
    Banned User!
    Join Date
    09-04-2018
    Location
    cyprus
    MS-Off Ver
    2007
    Posts
    282

    Re: counting double

    i hope its not difficult

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,716

    Re: counting double

    Louis - New Year's Day is a holiday in many parts of the world, so being with family and having fun will be top of most people's lists today, not your Excel problem. Just wait patiently until someone offers you help.

  8. #8
    Banned User!
    Join Date
    09-04-2018
    Location
    cyprus
    MS-Off Ver
    2007
    Posts
    282

    Re: counting double

    correct Have a nice and better 2019!

  9. #9
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,222

    Re: counting double

    Please try at H1 with Ctrl+Shift+Enter

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

  10. #10
    Banned User!
    Join Date
    09-04-2018
    Location
    cyprus
    MS-Off Ver
    2007
    Posts
    282

    Re: counting double

    i think i comfused you.its fine!thanks

    can you put me that formula at H1(=IFERROR(INT(MATCH(0,INDEX(--(A2:INDEX(A:A,COUNT(A:A))<>A1:INDEX(A:A,COUNT(A:A)-1)),N(IF(1,COUNT(A:A)-ROW(INDIRECT("1:"&COUNT(A:A)-1))))),)/2),INT(COUNT(A:A)/2)) ,which counts the event 12121212 but has a mistake becouse if you have for example 21 counts 1 correct then 212 count 1 correct then 2121 counts 2 correct then if the sequence is 21211 counts 0 correct! but the problem is if now is 212112 it counts 3 it should count 1 becouse the double numbers between(11) should give 0 and start a new count.(double or triple etc gives 0!
    Last edited by louis128; 01-01-2019 at 04:30 PM.

  11. #11
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,222

    Re: counting double

    Is this right?

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

  12. #12
    Banned User!
    Join Date
    09-04-2018
    Location
    cyprus
    MS-Off Ver
    2007
    Posts
    282

    Re: counting double

    Yes!my friend ! i thank you with all my heart.
    If you see my post #10 i have a formula which needs to be modified in order to count instead of doubles theat121212 and so on if next 2 =0 ,if next is 2 again =0 ,if next is 1 count 1 not sum all counts. like the formula you create above ,the same philosophy.

  13. #13
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,222

    Re: counting double

    The post #10 formula still work if you press Ctrl+Shift+Enter
    212112 count 1

    =IFERROR(INT(MATCH(0,INDEX(--(A2:INDEX(A:A,COUNT(A:A))<>A1:INDEX(A:A,COUNT(A:A)-1)),N(IF(1,COUNT(A:A)-ROW(INDIRECT("1:"&COUNT(A:A)-1))))),)/2),INT(COUNT(A:A)/2))

  14. #14
    Banned User!
    Join Date
    09-04-2018
    Location
    cyprus
    MS-Off Ver
    2007
    Posts
    282

    Re: counting double

    i think you are correct iam not sure ,212112 count 1 if next is 2 should count 0 not keep the record of previous! My last favor is please can you do it for me,please cause i cant copy pasre ,i dont know why.
    Last edited by louis128; 01-02-2019 at 02:32 AM.

  15. #15
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,222

    Re: counting double

    Please provide some sample on how it does not work.

    Is this right?
    Untitled.jpg

  16. #16
    Banned User!
    Join Date
    09-04-2018
    Location
    cyprus
    MS-Off Ver
    2007
    Posts
    282

    Re: counting double

    yes!!! is right!

  17. #17
    Banned User!
    Join Date
    09-04-2018
    Location
    cyprus
    MS-Off Ver
    2007
    Posts
    282

    Re: counting double

    But i Cant paste the formula,can you paste it at the spread sheet boss ,please , that is the last i want

  18. #18
    Banned User!
    Join Date
    09-04-2018
    Location
    cyprus
    MS-Off Ver
    2007
    Posts
    282

    Re: counting double

    can you paste it to the sheet,i will be gratefull cause i cant do it

  19. #19
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,222

    Re: counting double

    Please see attached Sheet2
    Attached Files Attached Files

  20. #20
    Banned User!
    Join Date
    09-04-2018
    Location
    cyprus
    MS-Off Ver
    2007
    Posts
    282

    Re: counting double

    great ! my regards!

+ 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. SUMIF double counting issue
    By Tjadi in forum Excel General
    Replies: 2
    Last Post: 02-08-2018, 07:31 PM
  2. Replies: 4
    Last Post: 07-13-2017, 12:24 AM
  3. [SOLVED] Avoid double counting of same value
    By Karen57 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 11-02-2015, 09:23 AM
  4. [SOLVED] COUNTIFS is double counting
    By infiniticihr in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-22-2014, 01:09 PM
  5. SUMIFS - double counting?
    By Geoff. in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 05-07-2014, 04:10 PM
  6. Avoiding Double Counting
    By sh55174 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-07-2014, 09:40 PM
  7. Countifs and Double Counting
    By jlacsina in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-18-2013, 09:55 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