+ Reply to Thread
Results 1 to 22 of 22

"Find All" is showing wrong count

  1. #1
    Registered User
    Join Date
    09-23-2012
    Location
    Mumbai
    MS-Off Ver
    Excel 2010
    Posts
    61

    "Find All" is showing wrong count

    I have a range of data, this data includes articles with HTML codes. Each cell have one article and a total of 200 articles therefore 200 cells.

    To explain in short, each cell have the word "<footer" in it. What I want to do is find the exact text "<footer" and replace it with, lets say any character "a" or "b" or whatever. But when I replace it only replaces 25 out 200, I am not sure what's wrong. Please help, I am badly stuck in this.

    Please find the excel attached.
    Attached Files Attached Files

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: "Find All" is showing wrong count

    As far as I can see there are only 25 cells that contain "<footer".
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: "Find All" is showing wrong count

    You are correct, faizzsheikh. When you use find-replace, it only replaces 25. There must be something like a non-printing character there too. However, if you use a formula (see attached cols B and c) it replaces the lot.
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: "Find All" is showing wrong count

    No... they're there. I checked with =FIND("<footer",A3), copied down...

  5. #5
    Registered User
    Join Date
    09-23-2012
    Location
    Mumbai
    MS-Off Ver
    Excel 2010
    Posts
    61

    Re: "Find All" is showing wrong count

    @glenn kennedy

    =SUBSTITUTE(A3,"<footer","|") this solves my problem! Thank you so much Glenn.

    However, if its due to non printable character how can we fix it without using a formula?

    God, I am out of trouble!!

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: "Find All" is showing wrong count

    I have been playing with this a bit more. It's VERY odd indeed...

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: "Find All" is showing wrong count

    No further forward. Why can't you use a formula to replace them?

  8. #8
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: "Find All" is showing wrong count

    strange
    i put in cell a2
    =repeat("x",row(a1)*100)&"<cat" dragged down to a131
    copy paste back special values so only the text was in there
    filter on contains cat shows all 130
    however
    now find/replace <cat with <dog it only did 81
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  9. #9
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,475

    Re: "Find All" is showing wrong count

    you have from 6129 to 24330 characters in each cell.

    You will have to use something else to use, Possible Notebook or Notepad++
    Last edited by davesexcel; 01-03-2015 at 12:24 PM.

  10. #10
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: "Find All" is showing wrong count

    I imported your Excel data into Word and did a Replace for <footer and there were 200 instances.

    Excel will only find 25 instances. Use Word to do the Replace and copy back to Excel.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  11. #11
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,475

    Re: "Find All" is showing wrong count

    When I do Find exact match xlvalues, it finds 200
    when I do Replace, replace window does not have XLValues only xlformulas, and then it only replaces in 25 cells.
    I think it may be a memory thing,

  12. #12
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: "Find All" is showing wrong count

    That makes me feel a bit better... if you're baffled. I've been searching for the "usual suspects amongst non-prnting characters, but can't find anything obvious.

    it's something to do with the length of the strings. The strings can be up to 24,330 characters. Only the 25 shortest (<10492 characters) are replaced with CRTL & H. Is there a limit on the number of characers CTRL+H can cope with???

  13. #13
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: "Find All" is showing wrong count

    http://www.teachexcel.com/excel-help...o.php?i=604224

    There used to be a 8192 limit. Must be more, now...

  14. #14
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: "Find All" is showing wrong count

    Using =FIND("<footer",A3) and filling down, finds <footer in every record. To replace <footer with something else use SUBSTITUTE

    Enter in B3 and copy down then copy and Paste Values to get rid of the formula.

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

  15. #15
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,475

    Re: "Find All" is showing wrong count

    I'm not sure of the limitations, when I did a find replace loop, the workbook crashed.

  16. #16
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: "Find All" is showing wrong count

    There are no specifications listed for find, replace in the specifications.

  17. #17
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: "Find All" is showing wrong count

    Quote Originally Posted by newdoverman View Post
    Using =FIND("<footer",A3) and filling down, finds <footer in every record. To replace <footer with something else use SUBSTITUTE

    Enter in B3 and copy down then copy and Paste Values to get rid of the formula.

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    I suggested that back at Post 3, but the OP seemed t want an alternative solution.

  18. #18
    Registered User
    Join Date
    09-23-2012
    Location
    Mumbai
    MS-Off Ver
    Excel 2010
    Posts
    61

    Re: "Find All" is showing wrong count

    This is extremely unusual... I experimented with 3 different cells which was not finding "<footer". I kept picking pieces of content and find it until exactly from where excel is rejecting to find, and to my surprise one had a character "a" another a space " " and another a character "p"

    How is this possible!

  19. #19
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: "Find All" is showing wrong count

    as far as i can determine for find/ replace it's max 8192 character length(excel 2007)
    see attached
    Attached Files Attached Files
    Last edited by martindwilson; 01-03-2015 at 01:20 PM.

  20. #20
    Registered User
    Join Date
    09-23-2012
    Location
    Mumbai
    MS-Off Ver
    Excel 2010
    Posts
    61

    Re: "Find All" is showing wrong count

    Quote Originally Posted by newdoverman View Post
    I imported your Excel data into Word and did a Replace for <footer and there were 200 instances.

    Excel will only find 25 instances. Use Word to do the Replace and copy back to Excel.
    What you are suggesting will not work, I already tried before coming here. When you copy back the data from Word or Notepad++ to excel the data gets messed up.

    My problem is already solved with the SUBSTITUTE formula suggested by Glenn Kennedy. I was just curious to know the reason why it was happening.

  21. #21
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: "Find All" is showing wrong count

    Hi, you're back... thisone's had us all baffled. It looks like the problem is related to the length of the string. Excel used to have an 8192 character limit for CTRL+H (see post 13). It's more than tha now (at least 10492: see post 12).

    I had thought that you weren't able to use SUBSTITUTE, but it seems like you can. If that's the case, can you pleas mark the thread as solved?

  22. #22
    Registered User
    Join Date
    09-23-2012
    Location
    Mumbai
    MS-Off Ver
    Excel 2010
    Posts
    61

    Re: "Find All" is showing wrong count

    Thanks a lot everyone for your help... you guys are wonderful!

    The thread is marked 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. [SOLVED] Comparing Data showing "Wrong" results.
    By kyjae in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-09-2014, 02:11 AM
  2. [SOLVED] How to USE """"" cells count """"" change font color
    By austin123456 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-09-2013, 06:14 AM
  3. Error "Subscript out of range", cant seem to find where code is wrong
    By KeithMale in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-14-2013, 07:07 PM
  4. Replies: 7
    Last Post: 05-13-2006, 05:02 PM
  5. Pivot table Data always showing up as "Count"
    By qwopzxnm in forum Excel General
    Replies: 1
    Last Post: 09-26-2005, 02: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