+ Reply to Thread
Results 1 to 7 of 7

If F2<=500 then delete entire row

  1. #1
    Forum Contributor
    Join Date
    10-30-2019
    Location
    Agra
    MS-Off Ver
    Office 2010
    Posts
    241

    If F2<=500 then delete entire row

    Hi,

    We have a file in that we have large data and we required a vba who can check

    If F2<=500 then delete entire row

    help pls
    Attached Files Attached Files

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: If F2<=500 then delete entire row

    Here is one way using a loop.
    Please Login or Register  to view this content.
    If you have LOTS of rows of data then it may be quicker to use different methods such as filtering the data and deleting the visible rows.

    BSB

  3. #3
    Forum Contributor
    Join Date
    10-30-2019
    Location
    Agra
    MS-Off Ver
    Office 2010
    Posts
    241

    Re: If F2<=500 then delete entire row

    Thanks BadlySpelledBuoy,

    its showing the error

    run time error '6'

    overflow


    when we click on debug its goes on
    For i = .Cells(Rows.Count, "F").End(xlUp).Row To 2 Step -1

  4. #4
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: If F2<=500 then delete entire row

    Change "Integer" to "Long" and see if that works.

    BSB

  5. #5
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: If F2<=500 then delete entire row

    Please try

    Please Login or Register  to view this content.
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    10-30-2019
    Location
    Agra
    MS-Off Ver
    Office 2010
    Posts
    241

    Re: If F2<=500 then delete entire row

    thanks Bo_Ry

    working

  7. #7
    Forum Contributor
    Join Date
    07-01-2018
    Location
    Adelaide, South Australia
    MS-Off Ver
    Office 365, & Excel 2016 on windows 10, & 14.7 for mac, & Excel 2015 for mac
    Posts
    173

    Re: If F2<=500 then delete entire row

    You only asked how to delete row 2 which is quite simple
    Please Login or Register  to view this content.
    But I assume that you actually want to check each row. Unfortunetly step down while deleting rows will likely lead to missing row that need to be checked.
    Thus it is important to to start at the last row, and move UP the sheet.
    Please Login or Register  to view this content.
    If my solution helped, please consider adding Rep

+ 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 by vba if delete word is present
    By duyvh0309 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 07-31-2020, 01:54 PM
  2. [SOLVED] delete entire row by vba if delete word is present
    By MoldyBread in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-10-2020, 12:02 PM
  3. iCell.EntireRow.Delete not working. Need code to Delete Entire Row
    By unit285 in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 05-27-2017, 10:48 PM
  4. [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
  5. VBA code to delete the FILTERED range and moving the cell up (dont Delete entire row)
    By mchilapur in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-14-2015, 07:48 AM
  6. [SOLVED] Delete cell only with certain critria. Don't want to delete entire row, the celsl only
    By RobertOHare in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-16-2013, 04:18 AM
  7. Delete entire row when cell says delete
    By Macdave_19 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-27-2007, 11:46 AM

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