+ Reply to Thread
Results 1 to 4 of 4

Search, delete, move cell up?

  1. #1
    Registered User
    Join Date
    08-28-2018
    Location
    Boston, Massachusetts
    MS-Off Ver
    2010
    Posts
    2

    Search, delete, move cell up?

    I copied from WordPress into an Excel workbook a list of 1,000 or so article titles with their corresponding authors, date published, etc. The result wasn't pretty, with blank and offset cells. I'm hoping to find a way to programmatically clean it up, though I am new to VBA and Excel macros.

    Two main issues:

    1) Every fourth line, this text shows up in Column A:

    Edit*|*Quick*Edit*|*Trash*|*View

    Is there a way to search for every instance of that string and delete the entire row in which the string resides?

    2) In each row containing the title (Column A) and author (Column B), the entry for the date published (Column C) is just "Published" In the following row, A and B are blank, and the true date of publication, say 7/12/2017, is in Column C. Is there a way to search for every instance of "Published," delete the cell in which it resides, and perform the "Shift cell up" function?

    I tried to attach a sample, but the Attach button didn't seem to be enabled.

    Many thanks for any help.

    pjs

  2. #2
    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,996

    Re: Search, delete, move cell up?

    If it's VBA you're after, I can't help. But....

    Will you please attach a SMALL sample Excel workbook? Unfortunately the attachment icon doesn't work at the moment. So, to attach an Excel file you have to do the following: Just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.
    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

  3. #3
    Registered User
    Join Date
    08-28-2018
    Location
    Boston, Massachusetts
    MS-Off Ver
    2010
    Posts
    2

    Re: Search, delete, move cell up?

    Thanks for the attachment tip, Glenn. Here it is (I think -- I uploaded a sample, but don't see it with this message).

    pjs
    Attached Files Attached Files

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,870

    Re: Search, delete, move cell up?

    try this
    Please Login or Register  to view this content.
    How to install your new code
    1. Copy the Excel VBA code
    2. Select the workbook in which you want to store the Excel VBA code
    3. Press Alt+F11 to open the Visual Basic Editor
    4. Choose Insert > Module
    5. Edit > Paste the macro into the module that appeared
    6. Close the VBEditor
    7. Save your workbook (Excel 2007+ select a macro-enabled file format, like *.xlsm)

    To run the Excel VBA code:
    1. Press Alt-F8 to open the macro list
    2. Select a macro in the list
    3. Click the Run button
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

+ 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. Search ListBox, Move Data and Delete Source Data
    By Andyw111 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-27-2018, 03:31 AM
  2. Search for cell containing and move on
    By Minimizeme in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-04-2015, 04:05 PM
  3. userform Help (Search, Modify, Delete and Move a Record)
    By anuji.de.silva in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-03-2013, 09:20 AM
  4. [SOLVED] userform Help (Search, Modify, Delete and Move a Record)
    By jason_kelly in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-02-2013, 01:46 PM
  5. [SOLVED] Move Every Other Cell Over One and Up One, Then Delete Blank Row
    By mlb723 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-09-2012, 07:53 PM
  6. Search and move to cell macro
    By ocm in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-06-2011, 08:54 PM
  7. [SOLVED] Delete cell and move to next
    By Robert in forum Excel General
    Replies: 2
    Last Post: 02-02-2005, 07:06 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