delete rows

  1. B

    Excel VBA to Delete Rows Based on Date & Time

    <tbody> F G 1 DATE TIME 2 2/19/2019 18:00 3 2/19/2019 23:20 4 2/19/2019 3:30 5 2/20/2019 6:30 6 2/20/2019 7:00 7 2/20/2019 8:00 </tbody> I'm having trouble deleting rows based on date & time. I have a report that exports transaction dates and times in...
  2. F

    Delete Blank Rows

    I need code that will: Find the first blank row in a set of data (the first blank row is ALWAYS at the bottom end of the data) Highlight that row and every row below it Delete I tried this code: 'Columns("A").SpecialCells(xlCellTypeBlanks).EntireRow.Delete (I use Column A because that always...
  3. T

    Compare 2 Rows in Power BI and Delete Matched Rows

    Please see below scenarios and provide your suggestions, My data source is in Oracle to power bi and as per my requirements I need to compare order no rows, if order number has .1 then I need to find order number without .1 and delete both rows. Does any one has any suggestion...
  4. Johnny Thunder

    VBA Help - Any way to speed up this code? - Delete Rows Based on Cell Value

    Hi Gang, Wanted to see if anyone has a way of speeding up a working code. Currently it takes 3-5min on my PC to run this code. Was hoping for a more time efficient update to make this faster, any suggestions are appreciated. What it does: Looks at column B on my worksheet and finds any cells...
  5. P

    How can I delete hidden rows after filter has been set?

    Hi, I currently have a workbook with multiple sheets that have a macro running to set a filter based on specific criteria from the main sheet. I would like to be able to have all items that are not a part of the filter (hidden) be deleted from the supporting sheets in an effort to reduce the...
  6. C

    Using VBA to reference the date in cell in a different sheet

    Hello! I am very new with VBA and am currently working on writing a macro that deletes all the rows in a sheet, that hold a date that falls on or before 6/1/18. Here is what I have so far... Sub Macro2() With ActiveSheet .AutoFilterMode = False With Range("g1", Range("g" &...
  7. R

    Delete every 2nd and 3rd row

    I have an excel column with about 5000 rows of text. Is there a quick way to delete every 2nd and 3rd row? There is nothing in the text that would allow me to filterin a smart way. Currently 1 2 3 4 5 6 etc. I need to delete rows 2,3 5, 6 and so on. Thanks
  8. M

    Trying to delete rows that do not contain specific text

    Hiya. I am having fun learning this vba stuff! But, I'm stuck. My Book contains businesses and address info, like this: <style>table { }tr { }col { }br { }td { padding-top: 1px; padding-right: 1px; padding-left: 1px; color: black; font-size: 12pt; font-weight: 400; font-style: normal...
  9. S

    Find specific value, loop through rows and delete rows.

    Hey All, Hope you can help me with this code. When a user clicks a button, the routine is looking for the second highest value. In the next step the range is selected, color is set from red tot black, no strikethrough and cells are no longer locked. This works fine, the routine starts from cell...
  10. J

    Macro to Delete Rows (multiple criteria)

    I have a worksheet consisting of approximately 50,000 rows and 30 columns (A - AD). Each column has a heading. I need a macro that will quickly delete all rows that don't contain specific text in Column C. Column C will have names of schools, elementary, middle, and high. There are approximately...
  11. D

    Can not delete rows (tried everything?)

    Hello! One of my sheets contain over 700,000 rows that can not be deleted. This makes it impossible to navigate the 2500 rows with text. I have tried: - CRTL+Shift + Down Arrow/Left Arrow --> Right Click ---> Delete. - CRTL+Shift + Down Arrow/Left Arrow --> Right Click ---> Clear Contents...
  12. M

    Macro Create Array of Rows and Delete

    Hello, I am trying to create a macro where it gives the bold value to all of the non bold cells beneath it. I also want to delete the bold rows but have not been successful Here is the code for the cell values which works. For Each cCell In Range("A" & "2" & ":A" & spot) If...
  13. N

    Excel VBA code to delete rows that do not match a separate list

    I am using VBA code in Excel 2016 to delete rows (on sheet "Data") that don't match criteria on another sheet (Column A, on sheet "Unique values") in Excel. However, the code only deletes selected cells in one column (C), so the remaining cells then don't match the original data in other columns...
  14. S

    VBA help to fix broken code - delete rows, paste transposed data

    Hello, I've tried to record a macro and expand that in order to help solve my problem. I've fixed some things I need to do by looking at solved threads, but not everything. Below is my code. Ideally, I'd like to do the data sorting operation for a bunch of text files in a named folder, but...
  15. K

    How to have excell continuously check cells and automatically delete rows

    Ok so I'm setting up an excel template for use in my office. Basically the template will look something like the image below. There will be two separate charts, one above the other, and cells A2-A10 will have a list of categories to choose from. I want to set the sheet up so that if the 'End'...
  16. A

    [VBA] Very slow looping through deleting rows

    I'm writing a macro to prompt for a user entered category and loop through ~ 40k rows and delete all except their category (with the largest category this would be ~8k left, so deleting 32k rows). I'm thinking there has to be a more efficient way to do this, its been running at least 7 minutes...
  17. L

    deleting rows --> excel not responding

    Dear readers The following code is creating a string of the following format "1:1, 5:5, 45:45, ..." in order to create a range with specified rows and then delete it in multiple sheets. On the second last line excel hangs and shows "Not responding" after about 10 seconds. As you can see, it's...
  18. E

    Delete rows on one sheet based on multiple columns of another sheet (both sheets with merged columns)

    Hi there, I'm quite new in Excel macros and I'm trying to go through 5,000+ rows of an excel sheet named Results (RAW). It contains data from Columns A to E: A - 1st condition (with merged columns) B - 2nd condition (with merged columns) C - disregard D - 3rd condition (with merged columns) E -...
  19. T

    VBA Trying to filter and delete records in workbook of 1,000,000 records - need better solution

    Need VBA solution for identifying a specific string in Column E, and deleting all the other rows that don't have that string. FYI - Using MS Access for Remote Automation of an Excel Workbook The code below was designed to open the workbook with a CSV converted file of over 1,000,000 rows (2 to...
  20. S

    Delete the first two rows in an excel spreadsheet

    I'm super new to this obvi, seeing as how i cant get this to work myself :/ All i need is a few lines of code that will delete the first two rows on a worksheet. thanks for the help :)

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