+ Reply to Thread
Results 1 to 12 of 12

Need help counting single integers within a text string

  1. #1
    Registered User
    Join Date
    10-14-2014
    Location
    Durban, South Africa
    MS-Off Ver
    Home & Office 2013
    Posts
    5

    Need help counting single integers within a text string

    Hi,

    I need some help with finding a way of counting single integer entries within a text string.
    The data is auto generated by a third party software.

    There are 28 possible integers within each "results" cell.

    I would like to be able to count how many times of a specific integer appears within the whole column.
    For example: How many times does "42" appear in column AJ (Results)? Sample.xlsx

    Is there a function that can do this? I know the COUNTIF does not help due to the multiple integers per cell.

    If no function exists, is it possible for a function to separate the integers within each text string into their own cells, which would then allow for a countif function to be used.

    Please see the attached sample of the data set.

    Thank you for any and all assistance in this matter.

  2. #2
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: Need help counting single integers within a text string

    Not sure exactly what and how do you want to count? But if you want to count the occurrence of 42 in AJ2, you may try something like this.....

    Please Login or Register  to view this content.
    Does this help?
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  3. #3
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Need help counting single integers within a text string

    Please share the expected result also and let us know how you are arriving it


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  4. #4
    Registered User
    Join Date
    10-14-2014
    Location
    Durban, South Africa
    MS-Off Ver
    Home & Office 2013
    Posts
    5

    Re: Need help counting single integers within a text string

    Hi sktneer,

    Thanks for the response.
    That doesn't really help.
    I need to count the occurrence for the Integer 42 within the entire column "AJ"
    In the sample provided "42" appears twice.

    I need to be able to count how many times any integer occurs within the entire column.

    Thanks for the help.

  5. #5
    Registered User
    Join Date
    10-14-2014
    Location
    Durban, South Africa
    MS-Off Ver
    Home & Office 2013
    Posts
    5

    Re: Need help counting single integers within a text string

    Hi,

    I don't have a solution.

    I'd like to have a list that states a count of how many times each integer appears.

  6. #6
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: Need help counting single integers within a text string

    First un-merge the column AJ2 and then you can try something like this......

    Please Login or Register  to view this content.
    That will return 2 as 42 occurs twice in the range AJ2:AJ25.

  7. #7
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: Need help counting single integers within a text string

    Hi,

    I think merged cells in AJ2:AJ25 will produce some unexpected results to any proposed formula.
    -----------------------------------------------------

    At Excelforum, you can say "Thank you!" by clicking the star icon ("Add Reputation") below the post.

    Please, mark your thread [SOLVED] if you received your answer.

  8. #8
    Registered User
    Join Date
    10-14-2014
    Location
    Durban, South Africa
    MS-Off Ver
    Home & Office 2013
    Posts
    5

    Re: Need help counting single integers within a text string

    When I un-merge the column the text string is repeated 4 times over. This returns a result of 8 instead of 2 when using the function.
    I just added a "/4" to the end of the the function you provided and it seems to work, but it is non specific for single digit integers because the input of "6" in the place of "42" yields an answer of "4" when it should show a zero answer.

  9. #9
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: Need help counting single integers within a text string

    You may try.....

    Please Login or Register  to view this content.
    See the attached sheet.
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    10-14-2014
    Location
    Durban, South Africa
    MS-Off Ver
    Home & Office 2013
    Posts
    5

    Re: Need help counting single integers within a text string

    That looks to be perfect!

    Thank you so very much.

  11. #11
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: Need help counting single integers within a text string

    Glad I could help.
    If that takes care of your question, please mark your thread as Solved by selecting Thread Tools (just above your first post) --. Mark thread as solved.
    Moreover you may also click on * (star) to Add Reputation if the solution provided helped you. This is another way to say thanks.

  12. #12
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: Need help counting single integers within a text string

    Hi,


    In AI27 integer you're searching

    Please Login or Register  to view this content.

    Just for sharing a different approach.

    Regards


    Edit: Hi Sktneer, sorry did not mean to overlap. I was speding too much time in traslating from my PC original settings.
    Last edited by canapone; 10-14-2014 at 05:34 AM.

+ 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. counting the number of the integers within text?
    By dwx in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-23-2013, 11:45 AM
  2. Sum integers in string
    By jordan2322 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-19-2012, 09:17 AM
  3. Replies: 9
    Last Post: 10-17-2011, 04:33 PM
  4. Counting duplicate integers in cell
    By cowtowner in forum Excel General
    Replies: 1
    Last Post: 05-12-2010, 12:08 PM
  5. [SOLVED] Extracting integers from a text string.
    By Bhupinder Rayat in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 09-28-2005, 01:05 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