delete a range of cells

  1. C

    Delete Cell Range, or Add Range and Copy Formulas etc. - Excel VBA

    Hoping someone can help. I have a worksheet that i need to remove or add a cell range(s) (red border area) from the 1st row down the column to a specific point (Stop Line) which can change dynamically. The more ID's added or removed in the rows will push the Stop Line down or up. Also, the more...
  2. An Quala

    VBA Code for deleting complete rows if it has specific text

    Hi, so I need to delete the complete row if specific criteria is met, the criteria is as follows, In a sheet named called "Data" If column B contains either of "John", "David", "Susan", "Macro", few of them, or all of them, then delete those specific rows leaving the others (Note: If any of...
  3. D

    VB Deleting partial row in table based on useform selection

    Hi All, I wanted to learn more about VB and so I thought I'd try out making a data entry logger. The Userform I made has 2 sections to it. One for normal training logs and another for adhoc training logs with a list for each. They both work independantly to each other except exit and save...
  4. E

    Delete cell in a column and adjacent cell if first cell has same beginning values

    I am a newbie in need of some help. I may not have explained clearly in title or tags. Suggestions welcome on that as well. I have two columns of data that can have up to 50 or more entries. The first column contains a date/time in the example format "10/1/17 11:59:52 PM CDT" The adjacent...
  5. K

    Deleting data from unprotected cells on selected protected worksheets

    Hello everyone I have an Excel (2016) that consists of 5 work sheets. All are protected with specific cells on each sheet being unprotected. I would like to clear all the data in the unprotected cells in 3 of the 5 worksheets proferably by clicking on a CommandButton. I would also like the...
  6. N

    VBA to delete a range of data based on a specified cell value

    I am looking for a VBA code to delete the contents (not formatting) of a range of a row based on the cell value. For example, as seen below, I have number (col A), Name (col B), and Gender (col C). I would like to enter a number in Cell E2 (representing a number in column A) and have it delete...
  7. A

    Macro to Delete Columns where Header <> User Entry

    Hi everyone. I've searched for a solution to this, but I haven't found one that fit my exact needs and my skills aren't flexible enough to modify ones I've found into something that works. I have two sheets "Inputs" and "Fees". Inputs takes as an input two user chosen elements from the set...
  8. 9

    Changing Criteria In Rerport Filter In Pivot Table In VBA

    I am trying to create a pivot table with VBA where I can deselect some options in my report filter. I have been able to create the pivot I just don't know how to deselect. This is going to be an automated process in the end that creates multiple pivot tables with specific data. This is what I...
  9. J

    how to write a vba code to delete data after a last row?

    'Range("A23").End(xlDown).Offset(1).Resize(ActiveSheet.UsedRange.Rows.Count).EntireRow.Delete So far I have this code to delete data after the last row. However, how can I edit the code to delete only A through E columns instead of entire rows? Thank you
  10. R

    VBA to Add and remove new Section

    Hi all, I honestly have no idea where to begin with this so was hoping someone could help me out. What I am trying to achieve is have two buttons, 1 of which (New Item) will make a copy of the section in my sheet from A11:I20 and insert it below with the item number etc blank ready for a new...
  11. S

    Delete Column if entire column is empty

    I have a spreadsheet without 40 columns and 100 rows where information is imported from a Microsoft Access file each day. Depending on the day certain columns are completely empty while others are filled. I have created a button on my spreadsheet and would like to link a macro to that button...
  12. R

    Need to Expand Current Formula

    =IF([TimeSheets.xlsx]Tim!B12="_r2500",(SUM('[TimeSheets.xlsx]1st:Last'!$E$23)),"0.0") This works as expected; however, I need to expand the "Tim" worksheet to include 1st:Last. (When I attempt this, I receive a #REF error.) I don't understand why 1st:Last works in the SUM, but not in the IF...
  13. XLWiz

    Sort in Ascending order and Delete other columns using VBA

    Hello everyone, I'm new to VBA development and am having a problem getting the below code to work properly. I need for it to sort column Y in ascending order and delete other columns I don't need. Here is what I have so far: Sub SortAndDeleteRows() Range("Y2").CurrentRegion.Select...
  14. S

    Making a Filtered Range Dynamic

    Hello Everybody, This I my first post and along with that I am a beginner to VBA/Macro. I really need your expertise to help me pass through this hurdle I have been facing couple of days. I have tried alot and went through 100's of post but wasnt able to come up with something concrete that...
  15. M

    New to VBA and need some help

    I am trying to make my life a little easier! I have a workbook that always has a variable amount of tabs (one for each person) as we add or remove people. Also have the first sheet as a "Recap" sheet. Need help with the code for the following (everything I have tried gets me errors): Clear...
  16. P

    Delete Any data not on print area

    Hi Can anyone recommend any macros for deleting any data not on the print area. Thanks so much :)
  17. Z

    How Do I Delete a Massive Amount of Information On An Excel Page

    How Do I Delete a Massive Amount of Information On An Excel Page. I have rows 1-8800 with information I don't want to delete. I have rows 8801 to 145,000 with information I do want to delete completely If I highlight 8801 and drag it down to row 145,000 and then right click and delete the...
  18. P

    Deleting Rows between text

    I have a long complex macro that I keep adding text to in order to improve. Right now it's perfect except for one last pet peeve item. Basically there is a report that we dump to excel and the macro formats the report, however sometimes the report is more than one page and there are two headers...
  19. S

    Only keep rows that have a range of specified values in a particular column

    Hi all :) I have a dataset with 34 columns and ~5000 rows. In column G there is an index number. The index number goes down the column, increasing by 1 each time, eg in G2 the index is 1, in G3 the index is 2, in G4 the index is 3. . . Data worksheet <tbody> Columns A, B, C, D, E, F G -...
  20. P

    accidental autosum

    So I have created the biggest "oops" in my life. I have a 45 page spreadsheet that i accidentally clicked one of the whole colums and clicked autosum. This has created a little bit more that 1 million rows. I have tried undo-ing, copying the content i need and deleting the column, and...

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