delete row

  1. S

    error on deleting last row

    Hi, i always encounter error whenver i delete last entry on the excel using the selected indx on listbox i have a listbox SBL_list.List with items coming form Worksheet SBL_T2K ( 9 columns) i need to delete the selected entire row on the listbox from the excel sheet. no error encountered when...
  2. B

    vba to delete table row

    Hi guys, I have a file where I have an inputbox, where the user types "MyInputMatriculaMaiusculas" values. This variable is then used to o through a table and delete the row, where this value is in the second column. Or, at least, that was the goal, because, in reality, this code is doing...
  3. A

    Delete Rows That Do Not Meet Criteria

    Hello, I am working in a 3,300 row excel sheet and I would like to delete the rows that I don't need. I want to delete rows that do not contain a certain NAICS classification, do not occur in a certain states, and will be awarded via "sole source" (I work in contracting). I have tried several...
  4. D

    VBA buttons: add / delete a row where clicked

    Hi everyone, For the love of god I couldn't figure it out. I have a document (all on one sheet) that has multiple sections. In each section there could be multiple rows "problems". I'm trying to add two buttons at the end of each row ("problem") to either ADD another row below where it's...
  5. A

    select, copy and delete rows

    Hi All, I'm new to VBA, I have a range of values (unique value for each person) I want excel to know the exact value and select it in (sheet1) then copy the entire row of that value to (sheet2) and delete that row from the (sheet1). can you please provide me with correct VBA code? Thank you..
  6. airforceone

    Deleting Entire Rows in Range

    needed help again.... what I'm trying to do is, loop thru the range (until last row) and delete entire rows if cell is empty/blank or cell value not equal to "PAID" below code does not seem to work LROW = 2 Do While LROW <= LastRow If (IsEmpty(Cells(LROW, 4)) = True Or Not...
  7. D

    Macro to delete rows based on cell values in a range - dynamic rows and columns

    Hello team, I would like to ask for help with the following macro as I just can't figure it out, I tried so many versions but nothing worked for me. I need to remove all rows in my sheet that do not contain value greater than 50 in any cell in a given row. That means that if the value is less...
  8. R

    VBA: Trying to delete all but the first row of a table

    I want to delete all rows in a table EXCEPT for the first row in the databodyrange. Using tbl.DataBodyRange.Rows.Count, I plan to delete that many -1. The problem I'm having is figuring out how to select my starting row in the databodyrange down to the last row of the table. I thought of using...
  9. K

    VBA Delete Rows of Previous Year

    Hello, I have the following code to delete rows with old data. Below are all the lines pertaining to the functionality I'm asking about, but please note that this is a very small piece of a much larger macro. The data is considered "old" if it matches the month entered via a user input box...
  10. K

    vba delete rows with cells not in a list

    Hello, I've seen some variations of this on the forum, but not really what I'm looking for. I have a list of users that's created through a Pivot Table, which I named "UserPivot." I also have a set of data on a worksheet. I want to check through that list of data and, if the username in...
  11. F

    Deleting rows based on a variable in 1 column

    hello, I have created some code that will delete an entire row based on if the value 1 is in the column or not. The code works but takes 40 minutes to run on 300,000 lines. Is there a better method to make this work? Sub Delete_Rows() Dim i As Long Dim LastRow As Long...
  12. E

    Delete Rows Where Column A Does Not Equal a Number or Numeric Value

    I thought I would be able to find a macro for this but could not. Pretty straight forward. "Delete Rows Where Column A Does Not Equal a Number or Numeric Value" Anyone have a solution? Thanks!
  13. VBE313

    Easier way to write this?

    I created an excel template that forces the user to enter data in every other column. What this code is meant to do is "delete" the active row of data and move up the data below it. I have it searching every 40 rows down to see if there is a value in there, if there is not a value then it knows...
  14. G

    VBA delete rows

    I have an Oracle report that is converted to delimited text. I need to delete the entire row if column A is blank. I need the VBA to start on row 30. Does anyone have a VBA code for this? Thank you.
  15. M

    VBA - Delete a range of TEXT rows and move Numbers to preceding row

    Hi all, I am a newbie and I would appreciate if someone could help to correct my code that is intended to delete all rows of a worksheet, excluding the rows starting by"2018" and the rows with some numbers separated by comas. the datasheet is setup as csv within column A and starting in A1...
  16. M

    VBA - Delete a range of rows if column contains a specific range of data

    Hi all, I am looking for a code that can delete a range of rows when the find condition is met,that is the string " Configurable" is found and then all the rows including configurable and exluding the number "2018". the dataset is setup as csv within the first column file. the first range of...
  17. G

    Deleting row when condition is met

    HI, I have a row of data and want to delete a row if the condition is true. What is wrong with my code? Sub deltotal() Lastr = Cells(rows.Count, "A").End(xlUp).row ctes = Range(x, 1) For x = 1 To Lastr Step 1 If Application.WorksheetFunction.Left(ctes, 18) = "Total for Customer" Then...
  18. P

    Compare 2 columns delete the row if match found

    <tbody> A B C D E 1 1111 1 4444 2222 0 2 2222 0 3333 0 3 3333 0 1111 5555 1 4 4444 1 6666 7777 0 5 5555 1 8888 1 6 6666 1 1010 0 7 7777 0 9999 8 8888 1 9 9999 0 10 1010 0 </tbody> I am trying to compare Column A and Column C and if the number in Column C is...
  19. J

    VBA multiple selection

    Is there a way to allow multiple selection delete? Like the user selects more than 1 cell and pushes the delete button without causing an error to a macro? I know to allow multiple selection is something like Target.Count > 1 . How can we incorporate if the user deletes multiple cells? Also...
  20. M

    Trouble deleting entire row

    I'm having trouble with the below not deleting the entire row. For Each cel In Range("L1", Range("L" & Rows.Count).End(xlUp)) If Left(cel.Value, 1) <> 8 Then cel.EntireRow.Delete End If Next

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top