+ Reply to Thread
Results 1 to 9 of 9

Spell Check - Change All

Hybrid View

  1. #1
    Registered User
    Join Date
    03-06-2019
    Location
    Tallahassee, FL
    MS-Off Ver
    Office 365 ProPlus
    Posts
    4

    Spell Check - Change All

    Hi! I am trying to clean up a large spreadsheet (~500,000 rows) with a lot of spelling errors. The problem I'm having is that choosing "Change All" only applies the change to "all" if you complete the spell check. Due to the large number of errors it is not possible for me to fix all the errors in one sitting, therefore I have to close the spell check window prior to finishing which means the "Change All" is not applied to anything past where I stopped. I would love to figure out a way to have any "Change All" applied to the whole spreadsheet immediately so I don't have to address the same correction in multiple sessions.

    Thanks in advance!

    Example: If I run spell check on this list, the checker will stop on #4 and suggest "words", if I click "Change All" #4 will be corrected and the checker will move to #9 to suggest a correction. If I close out the checker at this point, #12 will still be misspelled despite earlier choosing "Change All" for the same error.



    1 word
    2 test
    3 another word
    4 wrds
    5 again
    6 cake
    7 pizza
    8 mistake
    9 prblem
    10 correct
    11 right
    12 wrds
    13 spatula

  2. #2
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,432

    Re: Spell Check - Change All

    .
    This macro will edit the supplied term on all sheets. You can edit the macro to focus on only a single sheet :

    Option Explicit
    
    Sub FindReplaceAll_CountReplacements()
    'PURPOSE: Find & Replace text/values throughout entire workbook, notify user of how many cells were affected
    'SOURCE: www.TheSpreadsheetGuru.com
    
    Dim sht As Worksheet
    'Dim fnd As Variant
    'Dim rplc As Variant
    Dim ReplaceCount As Long
    
    Dim fnd, rplc As String
    
    fnd = InputBox("Enter OLD term. ", "Old Term ?")
    rplc = InputBox("Enter NEW term. ", "New Term ?")
    
    For Each sht In ActiveWorkbook.Worksheets
    
      ReplaceCount = ReplaceCount + Application.WorksheetFunction.CountIf(sht.Cells, "*" & fnd & "*")
    
      sht.Cells.Replace what:=fnd, Replacement:=rplc, _
        LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, _
        SearchFormat:=False, ReplaceFormat:=False
        
    Next sht
    
    MsgBox "I have completed my search and made replacements in " & ReplaceCount & " cell(s)."
    
    End Sub
    Let me know if you need assistance with editing the macro.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    03-06-2019
    Location
    Tallahassee, FL
    MS-Off Ver
    Office 365 ProPlus
    Posts
    4

    Re: Spell Check - Change All

    Thanks for the quick reply -- if I understand the macro correctly, this is basically a "find and replace". I am wanting spell check to discover the errors and let me decide if I want to use the suggested correction . . . and if I choose "change all" I'd like for it to apply the change to all the same errors down the line and continue on to the next spelling error.

  4. #4
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,432

    Re: Spell Check - Change All

    .
    The following locates the first spelling error then corrects all identical errors in the sheet.

    Option Explicit
    
    Sub spellCheck()
    
    Sheet1.Cells.CheckSpelling
    
    End Sub

  5. #5
    Registered User
    Join Date
    03-06-2019
    Location
    Tallahassee, FL
    MS-Off Ver
    Office 365 ProPlus
    Posts
    4

    Re: Spell Check - Change All

    Thanks again, however this macro has the same issues as I had doing it manually. If I run the macro, find the first error and click "Change All", it changes the first instance and then goes to the next error. If at that point I click "cancel" or close out the spell check window, only the first instance of the error is corrected. If I check errors up to (or past) the next instance of that error it then gets corrected automatically . . . I'm looking for a way to correct a spelling and have it automatically change all instances of that same misspelling, even if it is 200,000 rows past the current error, and there are 10,000 other spelling errors between the current instance and the next one . . . and then prompt me for the next error
    Last edited by LR2008; 03-07-2019 at 12:50 AM.

  6. #6
    Forum Expert avk's Avatar
    Join Date
    07-12-2007
    Location
    India
    MS-Off Ver
    Microsoft Office 2013
    Posts
    3,279

    Re: Spell Check - Change All

    If spelling tab not showing in sheet.
    Go to > office button > excel option > click customize > from choose command from select "Spelling" > click on "Add" > ok
    click on spelling tab > select corrected spell from suggestion > click on "Change All"


    atul


    If my answer (or that of other members) has helped you, please say "Thanks" by clicking the Add Reputation button at the foot of one of their posts.

    Also: if your problem is solved, please take the time to mark your thread as SOLVED by going to the top of your first post, selecting "Thread Tools" and then "Mark thread as solved".

  7. #7
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,432

    Re: Spell Check - Change All

    .
    I tested the macro here and it corrects all misspellings on the sheet at one time. (i.e., user inputs the incorrect spelling, then the desired spelling. The
    macro then searches the entire sheet finding all instances of the inputted misspelled word and changes that instance to the inputted correct spelling supplied by the user.)

    Perhaps I am not correctly understanding your goal.



    Also ... this FORUM and others require you to list every location you have posted your question.
    Your question is also posted at : https://www.mrexcel.com/forum/excel-...hange-all.html

    Forum rules require you indicate CROSS POSTINGS in your original post above.

    You should also do the same on the other Forums.
    Last edited by Logit; 03-07-2019 at 12:59 PM.

  8. #8
    Registered User
    Join Date
    03-06-2019
    Location
    Tallahassee, FL
    MS-Off Ver
    Office 365 ProPlus
    Posts
    4

    Re: Spell Check - Change All

    My apologies for not indicating the cross post.

    This is what I experience using the macro on the short example in my original post:
    • I start macro
    • spell-check window opens for row 4 error ("wrds")
    • I click "Change All" to change to the suggested correction ("words") and row 4 is corrected
    • spell-check window goes to row 9 error ("prblem")
    • if at this point I click "Close" or the "X" at the top of the screen because I do not have time to go through the whole spreadsheet the error on row 12 ("wrds") is still there even though I did a "Change All" on the same error (imagine that the sheet has 400,000 rows with 5,000 spelling errors and I've gotten to row 100,000 and don't have time to spell-check the rest of the sheet right now)
    • however, if I were to correct the error on line 9, then the spell-check would automatically correct row 12 and finish the spell-check

    Thanks again for all your help!

  9. #9
    Forum Expert avk's Avatar
    Join Date
    07-12-2007
    Location
    India
    MS-Off Ver
    Microsoft Office 2013
    Posts
    3,279

    Re: Spell Check - Change All

    Have you try as per post 6#

+ 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. Changing Spell Check language of Vba Spell Checker
    By jhelliar in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-09-2021, 03:51 AM
  2. VBA Spell Check
    By jwamawatts in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-09-2017, 12:46 PM
  3. Replies: 1
    Last Post: 10-20-2014, 11:01 AM
  4. Spell Check and Grammar check in Particular Column
    By dhilipan in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-16-2013, 06:35 PM
  5. Spell Check using VBA
    By jeskit in forum Outlook Programming / VBA / Macros
    Replies: 2
    Last Post: 10-10-2011, 04:03 AM
  6. VBA Spell Check - Dont ask to check rest of Doc?
    By Chris424 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-03-2008, 07:42 AM
  7. Spell check
    By Tonks in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-31-2006, 06:48 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