+ Reply to Thread
Results 1 to 13 of 13

Count second number after punctuation(full stop/comma)

  1. #1
    Forum Contributor
    Join Date
    07-21-2014
    Location
    Norway
    MS-Off Ver
    2016
    Posts
    225

    Question Count second number after punctuation(full stop/comma)

    Hi

    I need a formula that counts the second number after punctuation(full stop/comma)
    Ex, count number of cells from A1:A20, that ends with 0, or ends with 1. The numbers are with decimals, like 1.34, 1.37 1.00 1.56, 1.50 and so on. They are sometimes longer as well, like 1.4320, or 23.4567

    However, I only want the second number after punctuation(full stop/comma).

    So a number that is like: 1.4378
    I only want it to count the number 3

    A number that is like this: 25.607, I only want to count the number 0


    I'v tried with this formula, but can't get it to work correctly
    =SUMPRODUCT(--(RIGHT(A1:A20)="1"))

  2. #2
    Valued Forum Contributor
    Join Date
    04-01-2015
    Location
    The Netherlands
    MS-Off Ver
    2003/2007/2010/2016/office 365
    Posts
    514

    Re: Count second number after punctuation(full stop/comma)

    To get the 2nd digit after the decimal point
    Please Login or Register  to view this content.
    Otherwise, just place your file

  3. #3
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 2016
    Posts
    4,843

    Re: Count second number after punctuation(full stop/comma)

    Nevermind, I didn't read properly
    Last edited by Arkadi; 05-28-2020 at 12:48 PM.
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  4. #4
    Forum Expert Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    3,636

    Re: Count second number after punctuation(full stop/comma)

    Please try

    =SUMPRODUCT(--(MID(TEXT(MOD(A1:A20,1),".000"),3,1)="1"))

  5. #5
    Valued Forum Contributor
    Join Date
    04-01-2015
    Location
    The Netherlands
    MS-Off Ver
    2003/2007/2010/2016/office 365
    Posts
    514

    Re: Count second number after punctuation(full stop/comma)

    First let people think about a suggestion for themselves. I don't think it makes sense to compare a number with a text.

  6. #6
    Forum Contributor
    Join Date
    07-21-2014
    Location
    Norway
    MS-Off Ver
    2016
    Posts
    225

    Re: Count second number after punctuation(full stop/comma)

    Thank you

  7. #7
    Forum Contributor
    Join Date
    07-21-2014
    Location
    Norway
    MS-Off Ver
    2016
    Posts
    225

    Re: Count second number after punctuation(full stop/comma)

    So I have a problem with the formula =SUMPRODUCT(--(MID(TEXT(MOD(A1:A20,1),".000"),3,1)="1"))
    it works on some columns, but for some reasons it doesn't work on the one attached
    Attached Files Attached Files

  8. #8
    Forum Expert Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    3,636

    Re: Count second number after punctuation(full stop/comma)

    Please try
    =SUMPRODUCT(--(LEFT(RIGHT(TEXT(A2:A239,".000"),2))="1"))

    You have blank cells that can not calculate by Mod.
    Last edited by Bo_Ry; 05-29-2020 at 03:36 AM.

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Ipswich, England
    MS-Off Ver
    Office 365 (Win 10 - Work) & Office 365 Subscription Insider (Win 10 - Home)
    Posts
    39,641

    Re: Count second number after punctuation(full stop/comma)

    Do the columns that work have blanks in them?

    Provide sample data that shows a column that works and on that doesn't.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!

    Forum Rules (updated September 2018): please read them here.
    How to use the Power Query code you've been given: help here. More about the Power suite here.
    Don't forget to say "thank you" to those who have helped you in your thread. If you wish, you can also reward them by clicking on their reputation star bottom left.

  10. #10
    Forum Contributor
    Join Date
    07-21-2014
    Location
    Norway
    MS-Off Ver
    2016
    Posts
    225

    Re: Count second number after punctuation(full stop/comma)

    This one works, and it has blank cells...
    Attached Files Attached Files

  11. #11
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Ipswich, England
    MS-Off Ver
    Office 365 (Win 10 - Work) & Office 365 Subscription Insider (Win 10 - Home)
    Posts
    39,641

    Re: Count second number after punctuation(full stop/comma)

    Did you try the suggestion in post #8?

  12. #12
    Forum Contributor
    Join Date
    07-21-2014
    Location
    Norway
    MS-Off Ver
    2016
    Posts
    225

    Re: Count second number after punctuation(full stop/comma)

    Quote Originally Posted by Bo_Ry View Post
    Please try
    =SUMPRODUCT(--(LEFT(RIGHT(TEXT(A2:A239,".000"),2))="1"))

    You have blank cells that can not calculate by Mod.
    Thanks,that worked!

  13. #13
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Ipswich, England
    MS-Off Ver
    Office 365 (Win 10 - Work) & Office 365 Subscription Insider (Win 10 - Home)
    Posts
    39,641

    Re: Count second number after punctuation(full stop/comma)

    If that takes care of your original question, please select Thread Tools from the menu link above 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: 2
    Last Post: 12-23-2015, 01:22 AM
  2. How can I stop the short menu appearing when I press the full stop key?
    By Sadieberg in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 06-06-2015, 07:43 AM
  3. Count number appear in single column with comma separated
    By cheeyap91 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-29-2014, 12:38 AM
  4. [SOLVED] Applying punctuation to number
    By mothman0 in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 02-15-2013, 06:15 PM
  5. Count number of occurrences separated by comma
    By Niclal in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-23-2013, 03:39 AM
  6. Count results, add punctuation
    By herghost in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-30-2012, 05:59 AM
  7. [SOLVED] Count Number of full rows
    By Jamie in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-23-2005, 11:06 AM

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