+ Reply to Thread
Results 1 to 4 of 4

need help fixing my VBA

  1. #1
    Forum Contributor
    Join Date
    09-11-2014
    Location
    Eugene, Oregon
    MS-Off Ver
    MS EXCEL 2010
    Posts
    210

    need help fixing my VBA

    Current VBA

    Please Login or Register  to view this content.
    Currently this allows me to search any column I choose and look for whatever I specify and then it deletes any row that contains what I specified in that column.

    I run the code and the first input box asks what column and I say "I" then I run the code and it asks what to search for in that column I say "day" then it searches every column looking for the word day and if it finds it it deletes the row that day was found in.

    Here is what I need it to do:

    Ideally the code would not loop as the spreadsheets I am working in have tens of thousands of lines and it takes a long time to run.

    Secondly, I need it to be very specific, I type "day" and it deletes any row that contains the letters "day" so if a row contains everyday or daylight or dayton, etc. it deletes that row and I don't want it to do that. Sometimes I will have this search for a single letter or number and delete that row and I cant have it delete every row that contains the letter "D" I only want it to delete rows that only contain a letter "D" and nothing else. Unfortunately I am not very versed in VBA so what I am asking goes beyond my skill level. Thanks

  2. #2
    Valued Forum Contributor
    Join Date
    08-22-2011
    Location
    Auckland
    MS-Off Ver
    Excel 2019
    Posts
    716

    Re: need help fixing my VBA

    This can be done but it's best to post a workbook with dummy data to prevent back & forth posting for code adjustments. If I did exactly as requested you would end up with only one column with data, the rest of the sheet blank

  3. #3
    Forum Contributor
    Join Date
    09-11-2014
    Location
    Eugene, Oregon
    MS-Off Ver
    MS EXCEL 2010
    Posts
    210

    Re: need help fixing my VBA

    Sorry here you go. Looking at column M and removing Day.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    11-01-2012
    Location
    Cairo, Egypt
    MS-Off Ver
    MS Office 2013
    Posts
    76

    Re: need help fixing my VBA

    Please Login or Register  to view this content.
    Last edited by Subverter; 06-03-2016 at 07:47 PM.

+ 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. Need HELP fixing this code
    By Dewbo in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-29-2014, 09:16 AM
  2. [SOLVED] Need help in fixing my formula
    By rojashan in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-04-2014, 12:08 AM
  3. Help please fixing a macro
    By tyleromaha in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-09-2012, 12:07 PM
  4. Fixing #N/A in VLOOKUP
    By excelgrrl in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-21-2008, 11:37 AM
  5. Fixing Charts
    By moquenma in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 08-15-2008, 05:31 AM
  6. Fixing row height
    By gwinder in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-16-2006, 04:59 PM
  7. Fixing some bugs
    By daddioja in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 06-19-2006, 01:35 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