delete a range of cells

  1. 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...
  2. 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...
  3. 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...
  4. 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...
  5. 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...
  6. 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
  7. 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...
  8. 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...
  9. 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...
  10. 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...
  11. 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...
  12. 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...
  13. 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 :)
  14. 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...
  15. 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...
  16. 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 -...
  17. 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...
  18. L

    Excel 2007 error: Method 'Delete' of object 'Range' failed

    Hi, I have written a sub with the purpose of finding rows based on a critieria, copying the rows to another worksheet and deleting the original row. The code: Sub MoveToIgangvaerende() ' ' Flytter opgaven til sheetet Igangværende projekter ' Dim i, j, Index As Integer Forfra: For i = -1 To...
  19. E

    Deleting blanks with corresponding cells

    I have a large amount data with dates in 2 columns (example below). I am trying to build a macro where it can detect the blank cells and then delete the blank with the corresponding date. I am able to delete the blanks but I can't get rid of the dates so my data will be skewed with missing data...
  20. S

    Delete Named Ranges and reset Excel's memory of previous ranges

    I'm trying to build a workbook that builds a query table based on a user's entry of a parameter and have this change when they enter a new parameter. I've built the macro so that it's structured like so 1) clear any existing data 2) get data from report 3) copy and transpose it to another...

Some videos you may like

This Week's Hot Topics

  • Sort code advice please
    Hi, I have the code below which im trying to edit but getting a little stuck. This was the original code which worked fine,columns A-F would sort...
  • SUMPRODUCT with nested If statement
    Hi everyone, Hope you're all well. I'm hoping someone will be able to point me in the right direction with a problem I'm having with a SUMPRODUCT...
  • VBA - simple sort is killing me!
    Hello all! This should be so easy, but not for me, apparently! I have a table of data that can be of varying lengths and widths. My current macro...
  • Compare Two Lists
    I have two Lists and I need to be able to Identify differences between them. List 100 comes from a workbook - the other is downloaded form the...
  • Formula that deducts points for each code I input.
    I am trying to create a formula that will have each student in my class start at 100 points and then for each code that I enter (PP for Poor...
  • Conditional formatting formula required for day of week and a value
    Hi, I have a really simple spreadsheet where column A is the date, column B is the activity total shown as a number and column C states the day of...
Top