+ Reply to Thread
Results 1 to 7 of 7

vba code for replace

  1. #1
    Registered User
    Join Date
    08-18-2018
    Location
    Iraq
    MS-Off Ver
    2013
    Posts
    3

    vba code for replace

    Hi

    I need code for replace rows if i delete any row from table it will remove all rows to up by Vba . I Attach a file as example .
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: vba code for replace

    Try this code
    Please Login or Register  to view this content.
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  3. #3
    Registered User
    Join Date
    08-18-2018
    Location
    Iraq
    MS-Off Ver
    2013
    Posts
    3

    Re: vba code for replace

    thanks for you Yasser .
    this code delete row which i chose but i need to delete the data only .

  4. #4
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: vba code for replace

    You can use ClearContents instead of Delete in that case

  5. #5
    Valued Forum Contributor ImranBhatti's Avatar
    Join Date
    03-27-2014
    Location
    Rawalpindi,Pakistan
    MS-Off Ver
    Office 365
    Posts
    1,784

    Re: vba code for replace

    Try this after deleting a row. or you may put it into worksheet_Change event

    Please Login or Register  to view this content.
    Teach me Excel VBA

  6. #6
    Registered User
    Join Date
    08-18-2018
    Location
    Iraq
    MS-Off Ver
    2013
    Posts
    3

    Re: vba code for replace

    thanks Yasser & Imran
    I did mix yours codes and do some changes to work perfect

    Please Login or Register  to view this content.
    Last edited by jeffreybrown; 08-18-2018 at 09:07 AM.

  7. #7
    Valued Forum Contributor ImranBhatti's Avatar
    Join Date
    03-27-2014
    Location
    Rawalpindi,Pakistan
    MS-Off Ver
    Office 365
    Posts
    1,784

    Re: vba code for replace

    You don't need to type thanks .The forum has a button to say thanks to those who help out. just bellow the post of your helper on left hand side corner there is a * button click this to thank. This will save you from typing

+ 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. Replace string across ALL VBA code
    By jplourd in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-31-2015, 03:15 PM
  2. Possible to replace code in VBA like this one?
    By mrprofit in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-10-2014, 04:47 AM
  3. Replace Macro recorded code with more effective code
    By scaffdog845 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-12-2014, 01:09 AM
  4. Using Functions to replace my VBA code
    By bluespire in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-14-2012, 01:08 PM
  5. don't replace VBA code
    By willelas in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-13-2008, 01:37 PM
  6. Code to replace 'sumproduct'
    By chris46521 in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 08-10-2006, 12:37 PM
  7. Replace code
    By ALC in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-19-2005, 03:05 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