delete

  1. D

    VBA delete last row help

    Hello everyone. I am trying to piece meal my VBA where I need it to select all sheets in the workbook and delete the last row in each sheet. Each sheet has the same headers but varies in row so as long as it is the last row being deleted it will work. Any pointers would be greatly...
  2. E

    Prevent deletion of last row of excel table

    Hi folks I have an Excel Table with names and abbreviations of names (two columns only). I would like to prevent users from deleting the header row and last row in the table. <tbody> Abbreviation Surname and Initial PM Masters, P JL Leonard, J JM Matsau, J TOTAL 3 [given by...
  3. S

    Delete Rows if contains text in column A

    Hello All, Need a macro to delete rows if text equals to ("BB", "CCC","DDDD") in column A.
  4. S

    VBA Help - "Delete Method of Range class failed"

    Hi folks, i'm getting a Run-Time Error '1004' "Delete method of Range class failed" for the following code. Sub Satisfied() Dim MasterSht As Worksheet Dim ImportSht As Worksheet Dim LastRow As Long Dim x As Long Application.ScreenUpdating = False Set MasterSht = ThisWorkbook.Sheets("Master...
  5. M

    Delete chart from a specific cell using VBA

    Hi I've used the code below to move a chart from one sheet to another (from Sheet 5 to cell M2 in Sheet 1). However, when re-running the code to create the chart, I would like to delete the existing chart in cell M2 of Sheet 1, without deleting the other charts in Sheet 1. Does anyone know...
  6. P

    Delete entire rows by conditions

    Hi to all of you! Kindly require to provide me support for a VBA code so that to run through columns "O", "P", 'Q" and where the rows are blank or "0" should delete entire rows. Therefore that, the rows "1" - "7" are headings and the code should run from row "8" till rows down. Thank you all in...
  7. N

    Cannot delete page break in Excel

    I have a page break that is making the first page very small, I have tried everything to delete it and nothing works. Heeeellllpppp!!!
  8. I

    Delete Duplicate row based off of email then gender

    Hi all, I searched the forum and found 2 different macros that may work with some tweaking, but is beyond my capabilities. I need the following scenario to happen: 12000 email list has all info from first name, last name, address, gender, age, email and more. The only columns I am concerend...
  9. C

    VBA help

    Hi all, I have some code and I want to delete any rows where the cell in column A is "Yes". Please can someone help? Thanks, Chris
  10. S

    Create a basic macro button for removing specific rows or columns

    Hi all, Apologies for the simple request as a beginner to the forum, but I would like to have a button on a spreadsheet that I can delete either a specific column or row. I have code to remove a column as follows: Sub DeleteColumns() Dim varUserInput As Variant varUserInput = InputBox("Enter...
  11. M

    Deleting specific rows with VBA

    Hi Guys I have data in two columns and would like to delete data in the second column which has the letter 'N' in it, using the auto filter. The amount of rows will vary. In the example below, there are only 5 rows and I would like to delete rows 3 and 4, as they're the rows with the letter...
  12. P

    Delete entire row

    All hi, i am kindly require to provide me a VBA code so that to run through col. "A" and where find the description "NET COST OF SALES/(FOOD)" twice, should delete once entire row but the second one. I present below original data and expected result. Thank you all in advance Original Data...
  13. S

    VBA Coding to select cell under Headings when using filter

    I am using a filter to show all "BB" transactions and delete the rest of the rows that are not "BB". Here is what I recorded when I did it: 'Set autofilter on Column E for "BB" and delete all other rows Range("A1").Select Sheets("PPDR_BB").Select Rows("1:1").Select...
  14. J

    macro to delete all visible rows in an autofilter

    Hi, I have an autofilter on row 13 and then trying to delete all the visible rows I found somewhere that the below code should work, but it doesn't. Anyone who could help me crack the code? Thanks, Jos Rows("13:13").AutoFilter Field:=5, Criteria1:="22 - Rabobank 370113144" .Offset(1...
  15. R

    Remove commented lines

    I have an excel spreadsheet containing many rows copied from VBE. Some of these contain comments - always with a ' in column 1. I would like to delete these lines, but the ' is a hidden character and the program can not find it. Any suggestions, please?
  16. A

    delete row from VBA

    Hi, how can i delete used range in excel after apply filter, without header (First row). i want to do this in VBA. thanks
  17. A

    Macro - Delete Visible Filtered Rows

    Hi all, Happy Friday. I'm trying to record a macro that filters a table to any rows with a "D" in the designated row and then deletes the visible rows, unfiltering the table before ending the macro. I am using the below but it is failing on the "Selection.EntireRow.Delete" command - is anyone...
  18. L

    Pivot Table / Open in New Workbook, Save As, Delete Data.

    Hi All, I am in need of some help here. All the VBA Codes I have tried to use don't work. I am trying to open the information in a pivot table in a new worksheet (I have that part figured out but I cannot get it so it will allow me to add new sheets to my existing workbook every time it opens...
  19. E

    Delete row based on value

    Hi all, I need some help trying to write a macro that will search Column A for the value "1" and delete that entire row when the Column A has a cell with a value of "1". Thanks in advance for the help.
  20. R

    Prevent first row to be deleted

    Hi, This is part of my code: .Range(.Cells(2, 1), .Cells(2, 1).End(xlDown)).AutoFilter Field:=1, _ Criteria1:="xxxx" .Cells.SpecialCells(xlCellTypeVisible).EntireRow.Delete This code will also delete the first row (header) in my sheet. Is there a way to exclude the...

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