+ Reply to Thread
Results 1 to 7 of 7

coutnig the occurence of string in text and remove redundancy in data

  1. #1
    Registered User
    Join Date
    09-24-2015
    Location
    india
    MS-Off Ver
    2007
    Posts
    20

    coutnig the occurence of string in text and remove redundancy in data

    22 abc ntc -jkl hft ac *abc*

    50 ser ghi-bvn kun ntc * hft * 1

    24 lon nik-fty nik dp * ntc * 1

    29 abc uvw-hft tyu * nik * 0


    i am trying to count how many times abc appears with hft and ntc. i am using =COUNTIFS(B1:B5,D3,B1:B5,E2) formula where d3 is * hft * and e2 is * abc *. In the same manner for next row i m using countifs function. but with *abc*, * ntc * should return 0 not 1. if it comes in last (in second row) then it is denoting location which i want to match with *abc*. in first row it denotes name which i don't want.




    2) i have quite large data where some entries like this

    24 lon nik-fty brn dp

    29 brn uvw-hft tyu




    where brn show both vehicle and location. so i have to match vehicle and location combination like this


    * brn *
    * brn * 2


    it shows value 2 while it should return 0 value. i am using countifs(). in this query always any random number comes before first *brn*(like second row). i don't know how this concept to use in formula.


    thanks in advancee

  2. #2
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: coutnig the occurence of string in text and remove redundancy in data

    Attach sample excel file with expected result
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  3. #3
    Registered User
    Join Date
    09-24-2015
    Location
    india
    MS-Off Ver
    2007
    Posts
    20

    Re: coutnig the occurence of string in text and remove redundancy in data

    i have attache sample file
    Attached Files Attached Files

  4. #4
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: coutnig the occurence of string in text and remove redundancy in data

    D3=COUNTIFS($A$1:$A$10,D$2&"-*",$A$1:$A$10,"*-"&$C3)+COUNTIFS($A$1:$A$10,"*-"&D$2,$A$1:$A$10,$C3&"-*")
    Please Login or Register  to view this content.
    Try this and copy towards down

  5. #5
    Registered User
    Join Date
    09-24-2015
    Location
    india
    MS-Off Ver
    2007
    Posts
    20

    Re: coutnig the occurence of string in text and remove redundancy in data

    Thanks it is working.......how to solve 2nd ppart of problerm (*rst* matching with *rst* problem)

  6. #6
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: coutnig the occurence of string in text and remove redundancy in data

    It is also giving the result as 0

  7. #7
    Registered User
    Join Date
    09-24-2015
    Location
    india
    MS-Off Ver
    2007
    Posts
    20

    Re: coutnig the occurence of string in text and remove redundancy in data

    thanks for ur prompt reply it is working

+ 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: 16
    Last Post: 07-04-2014, 11:31 AM
  2. Find the last occurence of a text string in an email
    By hmltnangel in forum Outlook Formatting & Functions
    Replies: 0
    Last Post: 06-19-2014, 10:13 AM
  3. Replies: 8
    Last Post: 12-02-2013, 02:48 AM
  4. Replies: 2
    Last Post: 10-10-2013, 11:09 AM
  5. Find the last occurence of a text string in a list
    By NDBC in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-14-2009, 04:22 AM
  6. Replies: 1
    Last Post: 04-18-2005, 05:06 PM
  7. Replies: 1
    Last Post: 04-17-2005, 08:10 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