+ Reply to Thread
Results 1 to 10 of 10

delete rows based on cell value

  1. #1
    Registered User
    Join Date
    12-15-2015
    Location
    india
    MS-Off Ver
    2013
    Posts
    28

    delete rows based on cell value

    hi friends,
    i need to delete rows which contains 0 in column L.Normally I do it manually either by sorting or filtering but thats much time consuming when there is a large number of sheets in my workbook becoz I have to delete them one by one in each sheet.
    1-Is there any time saving procedure or macro available by which a button can be created which ask me the value to search for in a column to delete rows ?
    2.My second quiry is when I delete rows serial number in column changes automatically.Is it possible to serial no in column remain unchanged even after deletion of rows.
    In the attached file I want to delete rows containg 0 in column L from all sheets except last two named as cumulative rep and source
    Attached Files Attached Files
    Last edited by shakir1401; 12-19-2015 at 09:23 AM.

  2. #2
    Registered User
    Join Date
    11-18-2015
    Location
    Madrid
    MS-Off Ver
    2016
    Posts
    95

    Re: delete rows based on cell value

    Hi! The code below should work. See also the file attached. Hope it helps!

    Please Login or Register  to view this content.
    Attached Files Attached Files
    excelbat.com: free Excel tools, macros...

  3. #3
    Registered User
    Join Date
    12-15-2015
    Location
    india
    MS-Off Ver
    2013
    Posts
    28

    Re: delete rows based on cell value

    Quote Originally Posted by excel_bat View Post
    Hi! The code below should work. See also the file attached. Hope it helps!

    Please Login or Register  to view this content.
    thnx excel bat ,its working but button is available only on the first sheet and its deleting rows from the first sheet only.
    i want to delete rows from first 8 sheets in one go

  4. #4
    Registered User
    Join Date
    12-15-2015
    Location
    india
    MS-Off Ver
    2013
    Posts
    28

    Re: delete rows based on cell value

    and what about by second quiry excelbat?
    this is what i wanna do in any sheet not only for the attached one.
    actually i want to create a column whose value remains unchanged even if rows from the middle are deleted.

  5. #5
    Registered User
    Join Date
    11-18-2015
    Location
    Madrid
    MS-Off Ver
    2016
    Posts
    95

    Re: delete rows based on cell value

    Hi, your message is a bit rude but... anyway, the following code should do what you are searching for.

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    12-15-2015
    Location
    india
    MS-Off Ver
    2013
    Posts
    28

    Re: delete rows based on cell value

    Quote Originally Posted by excel_bat View Post
    Hi, your message is a bit rude but... anyway, the following code should do what you are searching for.
    i m really really sorry for that but I was really impressed with the button you have provided.
    I inserted this code but don't know how to run this macro

  7. #7
    Registered User
    Join Date
    11-18-2015
    Location
    Madrid
    MS-Off Ver
    2016
    Posts
    95

    Re: delete rows based on cell value

    Hi! See the file attached.

    If you think that the answer helped you, please consider to add some reputation by clicking the little star below
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    12-15-2015
    Location
    india
    MS-Off Ver
    2013
    Posts
    28

    Re: delete rows based on cell value

    Quote Originally Posted by excel_bat View Post
    Hi! See the file attached.

    If you think that the answer helped you, please consider to add some reputation by clicking the little star below
    i m sorry once again for my rude reply but that was not intentionaly,actually english is not my mother tounge, i m from india and speaks hindi.That was the reason for that.
    Now u solved my problem and saved my time too.
    thnku thnk u for your precious time and support,u really deserve +++++++++++++++++ repo.

  9. #9
    Registered User
    Join Date
    12-15-2015
    Location
    india
    MS-Off Ver
    2013
    Posts
    28

    Re: delete rows based on cell value

    one more help plz
    can u give me an idea how to create this button on a new worksheet,otherwise i have to keep this worksheet as a sample and every time I have to edit this one to create my final report.

  10. #10
    Registered User
    Join Date
    11-18-2015
    Location
    Madrid
    MS-Off Ver
    2016
    Posts
    95

    Re: delete rows based on cell value

    Just copy/paste the button, but you need to have the macro in the new file as well, and the same configuration: 8 sheets, same number of rows for the headings, etc. It is a tailor-made macro for the file that you submitted and might not work for other files.

+ 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 rows based on the value of a cell
    By Emma_B in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-04-2013, 05:35 PM
  2. Delete certain rows based on value in another cell
    By angelk in forum Excel General
    Replies: 1
    Last Post: 07-30-2012, 02:38 PM
  3. Delete rows based on cell content
    By scaffdog845 in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 05-06-2010, 07:34 PM
  4. Delete Rows based on cell value and then Insert rows alternatively with a formula
    By acsishere in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-11-2008, 04:27 PM
  5. Delete Rows Based On Cell Contents
    By aapke in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-28-2007, 08:14 PM
  6. Delete rows based on values in another cell
    By jimboc in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-11-2007, 08:54 PM
  7. Delete rows based on a cell value in the row
    By Dave in forum Excel General
    Replies: 7
    Last Post: 03-14-2006, 02:50 PM
  8. Delete rows based on Cell name
    By gmunro in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-25-2005, 09:15 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