+ Reply to Thread
Results 1 to 8 of 8

Find cells which contain specific word, delete cells and shift left.

  1. #1
    Forum Contributor
    Join Date
    01-06-2012
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    165

    Find cells which contain specific word, delete cells and shift left.

    I've been trying to record a macro that will search a column (Col B in my case) for any cells containing the word "day", select these cells and delete them (shift cells to the left).

    Whenever I try and record this action it's only recording the cell selection, not the find and select and delete/shift.

    Any ideas or solutions?
    Last edited by BPSJACK; 07-24-2012 at 07:00 AM.

  2. #2
    Forum Contributor
    Join Date
    10-08-2010
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    386

    Re: Find cells which contain specific word, delete cells and shift left.

    Here you go

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor wakeupcall's Avatar
    Join Date
    02-29-2012
    Location
    Sofia, Bulgaria
    MS-Off Ver
    Excel 2010
    Posts
    155

    Re: Find cells which contain specific word, delete cells and shift left.

    Hi,

    I believe you should use a loop. Can you please post an example spreadshset and I will see what I can do

  4. #4
    Forum Contributor
    Join Date
    01-06-2012
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    165

    Re: Find cells which contain specific word, delete cells and shift left.

    Example attached:
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    10-08-2010
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    386

    Re: Find cells which contain specific word, delete cells and shift left.

    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    01-06-2012
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    165

    Re: Find cells which contain specific word, delete cells and shift left.

    Gives me 'Run time error 1004':Delete method of range class failed' when I try it on my spreadsheet.

  7. #7
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Find cells which contain specific word, delete cells and shift left.

    Hi BPSJACK, try it
    Please Login or Register  to view this content.

  8. #8
    Forum Contributor
    Join Date
    01-06-2012
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    165

    Re: Find cells which contain specific word, delete cells and shift left.

    Works like a charm thank you so much!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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