delete rows

  1. K

    Code not working

    Hello, I'm trying to delete some rows from my data-set depending on what values certain cells contains (see code below). It works fine if the cell is 3, the macro returns the correct values - but for the rest of the cases, the rows won't delete. (for the reccord, I don't know for certain if the...
  2. V

    How can I simplify this?

    Hi, New to vba and using it to make macros. I built a macro based off one I found online. It's designed to delete rows if they have certain criteria, but each criteria is in separate auto filter section. Is there a way to list all of the criteria(TV show names) in one "section" ? Sub...
  3. E

    Delete row and row below (vba)

    Hi excel gurus, is it possible to delete a row if the cell contains "Building 101" AND delete the row below too? e.g: Random Building 101 Yes Hello World The goal would be to delete Building 101 and Yes however the rows below would also be shifted up i.e: Random...
  4. E

    Macro to delete all rows

    I have a macro that will identify whether there is any value in a specific cell in each tab. If it is blank, go to next tab but if there is data, delete all data and go to the next. The issue I am facing is that the code below will delete only the data set but leaves blank rows (checked by...
  5. W

    Delete first 9 rows of data

    Hello, I have some VBA code which copies information from one spreadsheet to another. How can I delete the first 9 rows of the data that gets pasted to the new spreadsheet? I have tried adding this line of code but it doesn't work. Am I missing some sort of linking element...
  6. T

    VBA - Extend deletion across all sheets

    I have a document with 37 sheets. Each sheet has a table with an identical list of thousands of products in column A, with different metrics associated to the products in columns B through G on each sheet. I'm not sure if this is even possible, but what I want to have happen is: - Delete any...
  7. J

    Delete Row if Criteria is met

    I have seen a few other posts similar to this, but not similar enough that i can adapt it at my current skill level. I need a VBA code that will format a page and Delete all rows with "PayPal: DPAGNF - Nutrition Dieteti" in column "C". here is what i have so far. thanks for helping! Sub...
  8. A

    Macro to delete every n+1 row across all worksheets

    Please the number of first rows to be deleted INCREASES along with the worksheet numbers. For example, row 1 (first row) would be deleted in sheet 1, row 1 and row 2 would be deleted in subsequent sheet 2, row 1 row 2 row 3 would be deleted in subsequent sheet 3, and so on. Please any help on a...
  9. E

    VBA to Delete rows if missing values across multiple columns

    Hello, I need to search through data from an online database and filter it based on certain criteria than can appear in multiple columns. I have copied the data into an excel sheet and the first batch is about 4k rows long and I probably only need to keep about 25% of that. My sheet is...
  10. A

    VBA code needs to run multiple times to work correctly

    Hello all, I have this seemingly simple code that will delete rows that have blanks in a particular column, but I doesn't delete all of them unless I run it 5 times or more. Any ideas out there as to what would cause this? Sub deletestuff() Dim R As Long For R = 2 To 100 If...
  11. G

    Delete rows depending on number of columns

    Hi, I would like to know how one can delete multiple rows depending on the number of columns that they have. For eg. say I have 100 rows and the number of columns with data are different for each row. Now I only want rows that have exactly 10 columns with data and delete the ones that dont meet...
  12. A

    VBA doesn't remove all the rows

    Hello all, I have this code that does what it's supposed to, but it requires me to run the code several times, I am just trying to see what I can improve upon to make this code run completely the first time. Sub deleteNonBank() Dim R As Long Dim Lastrow As Long Lastrow =...
  13. G

    Delete rows if (certain value) exists in data set.

    Hello, I've been trying to delete rows in my data set that contain the following keyword "lename" This is the following script I found and the following error Script : Sub Delete_All_Rows_IF_Cell_Contains_Certain_String_Text() Dim lRow As Long Dim iCntr As Long lRow = 150000...
  14. D

    deleting rows based on a condition

    Can someone point me to a vba process that would spin thru column "A" and delete any row where only one (type) is found. in the following there are two web01, web02 web03 and app03, so they would remain. Only one row is found for app01 and app02 so they would be deleted. Suggestions would...
  15. K

    Speed Up Macro Segment

    Hello, I have a very long macro that's taking a REALLY long time to run (so long that my computer goes into standby mode while it runs). I narrowed the problem area of the code down to the segment below, and am wondering if anyone has any tips on how to make this more efficient. It does what...
  16. J

    VBA to delete rows based on empty cell

    Hi. Brand new here and to the world of VBA and MACROS. I need help with a certain situation I have. I have a workbook with twelve worksheets, sheet 1 - sheet 12. A lot of data but what I need to concentrate on is column d. I would like assistance with a vba code that would delete the...
  17. K

    Macro deleting top-down or bottom-up?

    Is this macro deleting rows from the top down, or from the bottom up? How can you tell? For r = ThisWorkbook.Sheets("New Data Add").UsedRange.Rows.Count To 1 Step -1 If Cells(r, "F") = "Status History" Then ThisWorkbook.Sheets("New Data Add").Rows(r).EntireRow.Delete End If Next
  18. A

    Deleting rows based on multiple different values....

    I have a sheet of about 1000 rows ... So there are 11 rows of Master Order numbers but only 5 different Master Orders. Some Master orders have Slave orders, some do not. If a Master order has a Status of 12, 13 or 14 or a Type of 02 I need to remove that row. The problem Im having is...
  19. A

    VBA delete rows based on date

    I need help creating a VBA code that will delete rows based on a date. If possible, I would like for the code to delete the rows from the previous month. I want it to be dynamic so that it will work with any previous vs. current month. For Example: I have June 2019 and July 2019 data. Is it...
  20. L

    Delete Rows by Speciic Date Set in the Code

    I have a spreadsheet with rows of data sorted by date. I need to delete rows older than a specific date I want to set in the code, not an input box. Let's say 12/07/2018. The dates are currently in Column F. I'd like to set the column in the code as well. It could change. There are hundreds of...

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