+ Reply to Thread
Results 1 to 5 of 5

Macro to delete part of a row based on cell value vba

  1. #1
    Registered User
    Join Date
    05-15-2009
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    4

    Macro to delete part of a row based on cell value vba

    Hi All
    I need to be able to delete a section of a row based on a the value in column E however I have formula's in column's F&G that I want to retain.

    Macro to delete part of a row based on cell value vba.JPG

    I was originally deleting the entire row with the below macro but have since added formula to the other 2 column's and cant figure out how to modify the macro to delete A:E while keeping F&G
    Please Login or Register  to view this content.
    Any help appreciated
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    11-04-2018
    Location
    Denpasar
    MS-Off Ver
    Excel 2010
    Posts
    777

    Re: Macro to delete part of a row based on cell value vba

    I was originally deleting the entire row with the below macro
    but have since added formula to the other 2 column's and cant figure out how to
    I'm sorry as I don't understand your bold sentence,
    because I've run your code in your example workbook,
    the result I think it's OK and the formula in the other 2 column still there.

    Or do you mean you want to change the formula completely ?

    On the other hand, if you only delete the cell on column A to E only,
    the formula next to it gone wrong, it gives the result
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    05-15-2009
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    4

    Re: Macro to delete part of a row based on cell value vba

    Hi Karmapala
    Thanks your reply. I didn't think that one through very well at all and should have done a bit more testing before posting. As you have indicated deleting part of the row is going to break the prepopulated formula. I am importing columns A to E form another sheet so the simple fix is to delete the rows of data based on a the value in column E before importing.
    Thanks again for you reply.

  4. #4
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,485

    Re: Macro to delete part of a row based on cell value vba

    .
    Please Login or Register  to view this content.

  5. #5
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,835

    Re: Macro to delete part of a row based on cell value vba

    BobBrown,

    AutoFilter would be better.
    Please Login or Register  to view this content.

+ 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. delete entire row based on part of a cell value
    By sunmixed in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-07-2019, 11:45 AM
  2. [SOLVED] loop macro to delete part of a cell contents
    By morton01 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 10-24-2019, 07:29 PM
  3. [SOLVED] Macro To Completely Delete Contents Of A Cell Range Based On Specific Text In The Cell
    By Learner_Mike in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-01-2019, 03:49 PM
  4. Copy part of a row to a new sheet then delete whole row based on text value
    By badgerboy13 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-29-2012, 12:31 PM
  5. [SOLVED] Need macro to delete part of the data in a cell
    By Ecruse in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 10-31-2012, 03:20 PM
  6. Find Part number through Macro and output to associated part to certain cell
    By boylers75 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-09-2012, 04:32 PM
  7. Macro paste special part row based on cell value
    By uncleslinky in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-15-2011, 04:51 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