+ Reply to Thread
Results 1 to 8 of 8

Macro to only keep 100 words in a range of single words per column

  1. #1
    Registered User
    Join Date
    05-22-2014
    Posts
    11

    Macro to only keep 100 words in a range of single words per column

    Hello,

    I'm looking for a macro to remove all words (in a single word per cell format) in a range (approx 100 columns & 7000 rows), except for a list of 100 words.

    I'd prefer to email the file if that's okay.

    Appreciate any help you might have.
    Thanks,
    Pia

  2. #2
    Forum Contributor HaroonSid's Avatar
    Join Date
    02-28-2014
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    2,080

    Re: Macro to only keep 100 words in a range of single words per column

    upload ur sample file
    Use Code-Tags for showing your code :
    Please mark your question Solved if there has been offered a solution that works fine for you
    If You like solutions provided by anyone, feel free to add reputation using STAR *

  3. #3
    Registered User
    Join Date
    05-22-2014
    Posts
    11

    Re: Macro to only keep 100 words in a range of single words per column

    Okay... this file should be good. The words I want to keep are on the tab called keep.
    Thanks!

  4. #4
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Macro to only keep 100 words in a range of single words per column

    Perhaps something like this
    Please Login or Register  to view this content.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  5. #5
    Registered User
    Join Date
    05-22-2014
    Posts
    11

    Re: Macro to only keep 100 words in a range of single words per column

    Thanks! No doubt it's the user not the script but I got the following error:
    Run-time error '9': Subscript out of range
    When I click on Debug it highlights the row:
    "With ThisWorkbook.Sheet("Keep")"

    Appreciate your help.
    Best regards,
    Pia

  6. #6
    Registered User
    Join Date
    05-22-2014
    Posts
    11

    Re: Macro to only keep 100 words in a range of single words per column

    p.s. don't be alarmed if the the words in the Keep sheet don't match some of the words in the main sheet. They will match once I stem the words on the main sheet. Hope that makes sense.
    Thanks,
    Pia

  7. #7
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Macro to only keep 100 words in a range of single words per column

    That should be Sheets not Sheet
    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    05-22-2014
    Posts
    11

    Re: Macro to only keep 100 words in a range of single words per column

    Thanks! I copied and pasted the code into macro. Tried it again and get the following errors.
    Run-time error '1004' Application-defined or object-defined error &
    Run-time error '9'
    It must be the way that I've loaded the code into VBA. Do you get these errors in my file?
    Sorry to be a pain, appreciate your help with this.
    Thanks,
    Pia

+ 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] Column of single words as filter for columns with sentences
    By [email protected] in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 12
    Last Post: 01-23-2014, 12:11 PM
  2. Macro to insert list of words in single cell
    By raghu n in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-11-2013, 03:50 PM
  3. Highlight cell with many words, with duplicates from row with single words.
    By Meows in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-15-2010, 08:27 PM
  4. How to Extract Single Words from Excel Column
    By Mediadirect1 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-03-2009, 08:15 PM
  5. [SOLVED] how do i insert words into a column without erasing the words
    By soccer5585 in forum Excel General
    Replies: 0
    Last Post: 06-08-2005, 07:05 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