+ Reply to Thread
Results 1 to 9 of 9

Help Deleting Cells in Columns

  1. #1
    Registered User
    Join Date
    08-13-2009
    Location
    Glasgow
    MS-Off Ver
    Excel 2016,2016,365
    Posts
    92

    Help Deleting Cells in Columns

    Hello,

    Found and adapted some code online

    I basically need to loop through, deleting a shifting cells to the left until E column has the value "BU".

    The code takes forever and needs to re- run all the time as we change the start cell in E Column. Plus i think it starts in the very last column in the workbook, whatever number that is, instead of looking for the first column with a value before moving left. It doesn't need to look past column AZ.Any ideas to make it better, faster? Do until perhaps. Thanks
    Ross

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    11-28-2015
    Location
    indo
    MS-Off Ver
    2016 64 bitt
    Posts
    1,513

    Re: Help Deleting Cells in Columns

    Please Login or Register  to view this content.
    Or use autofilter
    Please Login or Register  to view this content.
    Or use for
    Please Login or Register  to view this content.
    "Presh Star Who has help you *For Add Reputation!! And mark case as Solve"

  3. #3
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,888

    Re: Help Deleting Cells in Columns

    How about
    Please Login or Register  to view this content.

  4. #4
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Help Deleting Cells in Columns

    You need to loop backwards if you want to delete or insert a row or column.
    Assuming you have data in rows 2


    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    08-13-2009
    Location
    Glasgow
    MS-Off Ver
    Excel 2016,2016,365
    Posts
    92

    Re: Help Deleting Cells in Columns

    Hello

    Thanks for your help. Unfortunately, non of the above quite worked.

    I found the below which works but I need it to check the next cell to the right and delete if blank, before moving down another row. Thanks Ross

    Please Login or Register  to view this content.

  6. #6
    Forum Expert
    Join Date
    11-28-2015
    Location
    indo
    MS-Off Ver
    2016 64 bitt
    Posts
    1,513

    Re: Help Deleting Cells in Columns

    Try this
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    08-13-2009
    Location
    Glasgow
    MS-Off Ver
    Excel 2016,2016,365
    Posts
    92

    Re: Help Deleting Cells in Columns

    Hi Daboho

    I get an object error on this line

    Please Login or Register  to view this content.

    Regards

    Ross

  8. #8
    Forum Expert
    Join Date
    11-28-2015
    Location
    indo
    MS-Off Ver
    2016 64 bitt
    Posts
    1,513

    Re: Help Deleting Cells in Columns

    Sorri change to
    Please Login or Register  to view this content.

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2507 (Windows 11 Home 24H2 64-bit)
    Posts
    91,891

    Re: Help Deleting Cells in Columns

    @ Rosscortb

    Before we take this any further, please re-read our forum rules to refresh your memory about the cross-posting rule, and then please provide links to any other forums where you have asked the same question.

    No more help is to be offered, please, until this has been done. Thanks.
    Last edited by AliGW; 12-12-2018 at 09:11 AM.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

+ 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] Change Macro to stop deleting cells in 2 columns
    By CHRISTINEKENDALL93 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-26-2018, 04:42 PM
  2. Deleting highlighted cells within four columns of data - VBA?
    By RedditGold in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 02-21-2017, 06:10 PM
  3. [SOLVED] Deleting info in locked cells/columns
    By txnc in forum Excel General
    Replies: 18
    Last Post: 01-07-2014, 10:06 AM
  4. Deleting and moving certain columns of cells from one sheet to another.
    By m0aje in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-22-2012, 11:52 AM
  5. Deleting blank cells in columns
    By teja in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-17-2012, 07:58 PM
  6. Deleting a range of cells (rows and columns)
    By ketspatel in forum Excel General
    Replies: 5
    Last Post: 04-05-2011, 11:45 AM
  7. [SOLVED] Deleting and shifting cells and columns
    By Curt1521 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-08-2006, 11:20 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