+ Reply to Thread
Results 1 to 23 of 23

Delete Entire row by vba (macro Correction)

  1. #1
    Forum Contributor
    Join Date
    05-10-2020
    Location
    india
    MS-Off Ver
    2013
    Posts
    221

    Delete Entire row by vba (macro Correction)

    Please Login or Register  to view this content.



    This macro is not working u corrected this macro but it has issue
    If column B of 1.xls matches with column A of H3.xlsb then do nothing else delete entire row
    we have to match each cells of column B & Column A
    Attached Files Attached Files

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,474

    Re: Delete Entire row by vba (macro Correction)

    What is not working?
    Change the = to <>

    You will also have issues because you are deleting rows from the top down, not the bottom up.

  3. #3
    Forum Contributor
    Join Date
    05-10-2020
    Location
    india
    MS-Off Ver
    2013
    Posts
    221

    Re: Delete Entire row by vba (macro Correction)

    After this Change the = to <>
    Also i am not getting correct Output Dave Sir

  4. #4
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,102

    Re: Delete Entire row by vba (macro Correction)

    Try these changes:

    Please Login or Register  to view this content.
    This code deletes line from the bottom up
    Last edited by maniacb; 09-19-2020 at 02:34 AM. Reason: Corrections to response

  5. #5
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,474

    Re: Delete Entire row by vba (macro Correction)

    Try this,

    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    05-10-2020
    Location
    india
    MS-Off Ver
    2013
    Posts
    221

    Re: Delete Entire row by vba (macro Correction)

    The macro which i used is the fast macro & i need changes in that only sir,
    So plz correct my macro Sir
    maniacb the changes which u have given is not perfect
    & Daves sir i need changes in my maro only

    we have to delete entire row of 1.xls
    Last edited by dumdumbum; 09-19-2020 at 01:20 AM.

  7. #7
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,474

    Re: Delete Entire row by vba (macro Correction)

    If I could I would. Why do you think I gave you a different alternative?

    Switch the ranges if you want it the other way.

  8. #8
    Forum Contributor
    Join Date
    05-10-2020
    Location
    india
    MS-Off Ver
    2013
    Posts
    221

    Re: Delete Entire row by vba (macro Correction)

    Please Login or Register  to view this content.
    This macro is not perfect bcoz i may have more data in h3.xlsx & this macro refers to a range $A$2:$A$19

  9. #9
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,474

    Re: Delete Entire row by vba (macro Correction)

    Ah yes.

    Please Login or Register  to view this content.

  10. #10
    Forum Contributor
    Join Date
    05-10-2020
    Location
    india
    MS-Off Ver
    2013
    Posts
    221

    Re: Delete Entire row by vba (macro Correction)

    Sheet name may be anything
    Please Login or Register  to view this content.

  11. #11
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,474

    Re: Delete Entire row by vba (macro Correction)

    Yes, it may.

  12. #12
    Forum Contributor
    Join Date
    05-10-2020
    Location
    india
    MS-Off Ver
    2013
    Posts
    221

    Re: Delete Entire row by vba (macro Correction)

    But i am getting error when i changed Sheet2 to sheet(2)

  13. #13
    Forum Contributor
    Join Date
    05-10-2020
    Location
    india
    MS-Off Ver
    2013
    Posts
    221

    Re: Delete Entire row by vba (macro Correction)

    I used this & i got error
    Please Login or Register  to view this content.

  14. #14
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,474

    Re: Delete Entire row by vba (macro Correction)

    Need the worksheet name in the formula.

    Please Login or Register  to view this content.

  15. #15
    Forum Contributor
    Join Date
    05-10-2020
    Location
    india
    MS-Off Ver
    2013
    Posts
    221

    Re: Delete Entire row by vba (macro Correction)

    Awesome Macro
    Thnx Alot DavesExcel Sir for helping me in solving this Problem
    Have a Awesome Day Sir

  16. #16
    Forum Contributor
    Join Date
    05-10-2020
    Location
    india
    MS-Off Ver
    2013
    Posts
    221

    Re: Delete Entire row by vba (macro Correction)

    Daves Sir, I have similar problem one more & i tried to edit the given macro But i was unsuccessful in the same
    Plz have a look in it


    & we have to delete the entire row of 1.xls only
    everything is same to same only slight change is required & i was doing the same & i got confused Sir
    It will be a great help if u look in it Sir
    Attached Files Attached Files

  17. #17
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,474

    Re: Delete Entire row by vba (macro Correction)

    What is the change?

  18. #18
    Forum Contributor
    Join Date
    05-10-2020
    Location
    india
    MS-Off Ver
    2013
    Posts
    221

    Re: Delete Entire row by vba (macro Correction)

    U have used the formula so i am confused & i shared the same to u sir

  19. #19
    Forum Contributor
    Join Date
    05-10-2020
    Location
    india
    MS-Off Ver
    2013
    Posts
    221

    Re: Delete Entire row by vba (macro Correction)

    Plz see the headers also & needed change as per this

  20. #20
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,474

    Re: Delete Entire row by vba (macro Correction)

    Here are two options.
    Please Login or Register  to view this content.

  21. #21
    Forum Contributor
    Join Date
    05-10-2020
    Location
    india
    MS-Off Ver
    2013
    Posts
    221

    Re: Delete Entire row by vba (macro Correction)

    Sorry i missed a point Actually while editing the macro i was confused
    We have delete the matched on & in 1.xls non matched data will be present
    Sorry DavesExcel Sir for the same

  22. #22
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,474

    Re: Delete Entire row by vba (macro Correction)

    Your 1st post says you want to keep the ones that =.
    If column B of 1.xls matches with column A of H3.xlsb then do nothing else delete entire row

    Change the formulas to >0

  23. #23
    Forum Contributor
    Join Date
    05-10-2020
    Location
    india
    MS-Off Ver
    2013
    Posts
    221

    Re: Delete Entire row by vba (macro Correction)

    Awesome Davesexcel Sir Awesome
    Problem Solved
    Thnx Alot For ur Grat Help Sir

+ 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] Delete Entire row by vba (macro Correction)
    By dumdumbum in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-09-2020, 06:30 AM
  2. [SOLVED] Macro Correction (If condition matched in a column then delete that entire row)
    By quirkybox in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-24-2020, 11:19 AM
  3. [SOLVED] Macro Needed to Delete Entire Row if the Entire Row (Or Col A,B,C,D in row ) are blank
    By swade730 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-04-2016, 06:32 AM
  4. Replies: 4
    Last Post: 10-12-2014, 08:54 AM
  5. macro to delete entire row with a checked box
    By emymeeky in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-08-2014, 09:44 AM
  6. Macro to delete the entire row
    By Sindhuja in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-21-2008, 10:07 PM
  7. [SOLVED] Help! with Macro - delete entire row
    By Rashid in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-04-2006, 05:20 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