delete a range of rows

  1. A

    Delete Rows based on date

    Hi, I have a spreadsheet containing current month and last month data. My goal is to create a macro to delete the last month of data and then point to a new workbook to copy and paste the new current month data into the existing workbook. Is there a simple VBA code to create this? For example...
  2. F

    Delete Rows Between two Columns

    Hey Team, <tbody> Experience V1 V2 Mobile No: Experience V3 v4 v5 Mobile No: Experience V6 Mobile No: Experience V7 v8 v9 Mobile No: </tbody> I want to delete Values between "Experience" to "Mobile:", ie v1, v2 , v3, v4 ....... Problem is , some has...
  3. S

    Code to remove specific lines from a large number of .csv files

    Hello all, I have no prior knowledge of VBA code, so please bear withme if this question has been answered before in some way or another. The context of the problem is that I have a relativelylarge (>100) number of .csv files which all follow the same format and the samethree rows need to...
  4. Z

    need to remove empty rows from Excel table and then resize the table - using VBA

    I wrote a macro (mostly by recording it) that copies data from a section on one sheet then calculates the end of my table on another sheet and pastes (paste special, being that the data I am pasting is a formula and I need to paste the values) the data to the end of my table, which on its own...
  5. M

    Delete rows ( <> time cells)

    Hello, I am looking for solution to delete rows with event time which I am not intrested in. As for example I would like to delete/clear every rows between time 6:00 AM and 6:05 AM with macro. What is more I would be great if macro would ignore the date and focus only on time because it is...
  6. S

    Using Named Range instead of Column reference - VBA

    There is a bit of code I am using to remove rows where if certain text in the column is not present, the row is deleted, thus leaving only the header and the rows that do contain the required text. The code is as follows and works quite well: Sub DeleteRows()Dim r As Long, lr As Long lr =...
  7. E

    Deleting filtered table rows

    Hello, I am struggling to figure out how to delete filtered table rows. In my file, I have reports directly connected to our report server and am trying to update my Macro to delete filtered rows. I have tried many different ways to do this and i keep coming up short. Below is an example of...
  8. W

    VBA Delete multiple rows based on find criteria

    Hi Everyone, I am a newbie! I was hoping for some assistance with the following code. I am looking to have this code, find the criteria in a sheet and delete ALL rows with that criteria. This code only deletes the first record it comes across. I tried to play with a loop but I am not sure...
  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. J

    delete rows if there are "no data"

    I would like to write a vba code that if find a row contains "No Data" then delete seven rows to up. <colgroup><col span="7"><col></colgroup><tbody> RSV 134 ATN AT OT Close Name NA DT CRA ADJC ADJ NA No Data Found for selected </tbody> So...
  11. J

    Filter and delete criteria with loop

    Sub GatherInfoHimchanLooping() Dim exclude As String Dim endrow As String: endrow = Sheets("Info").Range("E100").End(xlUp).Row Dim Finalrow As String: Finalrow = Sheets("Info").Range("I100").End(xlUp).Row For i = 24 To endrow exclude = Cells(i, 5).Value Sheets("Data").Select...
  12. X

    Deleting Rows that meet filtered criteria only in a table

    Hi If I filter a table and the filtered result is what needs to be deleted (nothing else), How do i go about writing code to select the filtered rows to be deleted only (not the headers) within the Table or the rest of the worksheet?
  13. S

    checkboxes and making rows dissapear/reappear!

    I'm putting together a nutrition spreadsheet and I want to be able to click on checkboxes in rows and have the info (proteins/carbs/fats) be added or removed from a running total for that day. Any food that will make me go over the limit on any of the 3 areas I want to have removed from the...
  14. J

    VBA: Delete blank rows

    I work with data on a regular basis that is badly formatted. In the data set I have every alternate row is blank. Each week the amount of data will vary so there could be 500 rows or 10000 rows. Is there a macro i can run that that will start at the first row containing data (typically row 4)...
  15. A

    Remove entire row based on a text that starts with a specific letter (beginner) vba macro

    Hi, how can I achieve deleting the entire row based on a text starting with letter "X" actually, I already have the code below from my previous inquiry and I just forgot to include this particular requirement. is there any way to embed the missing function? sub duplicate() Dim Rng As Range...
  16. D

    Macro

    Hi, Is it possible to have a macro that deletes data from a table? e.g - If cell I10 (Sheet2) matches data in a table on Sheet1 then delete the row that the data is stored in on Sheet1
  17. V

    Delete cells specific to names

    Hello Everybody, I have an excel file where I would like to delete rows if a list names appear in either column L or M. Would anybody know what VBA is required for this please? Thank you for your help. Noob
  18. M

    VBA to Delete Unused Rows

    I have a listobject which can expand in size; sometimes I add new data underneath it and sometimes I delete rows. What is the best way to delete unused data underneath the listobject? Is it something like "delete all rows from 65553 up to listobject"? How do I do that? Will I have to loop...
  19. D

    Need a Macro to Delete Cell and Shift Cells up

    So here's the situation... I've set up web queries for historical data from Yahoo Finance (so that way I can run automate updates on the data set). There's two web queries to upload two sets of data - 1 for the historical prices of an index, and the other for the historical prices of the ETF...
  20. V

    vba code to delete duplicate rows in range causing error 1004

    I am trying without success to write a vba procedure to delete a duplicate range of cells. The object of the procedure is to define one range of cells and if the code finds a match it should delete the range that matches. This worksheet was imported data from a text file. The error is happening...

Some videos you may like

This Week's Hot Topics

  • Use Filter function with 2 criteria to return a specific value
    I've spent many hours trying to find out why the basic formula for Filter function with 2 criteria will not return a value other than #CALC. I'm...
  • Loop stopping at row 10
    Below is a code I had a lot of help with from user such as yourself. This code worked well but now is stopping a row 10 and I can't see why! Could...
  • Numerical Order Code for Macro
    I am trying to find a code or fix what i have on the macro that will automatically make the certain column generate in numerical order when I...
  • Calculate time in excel
    I get a text report from our time keeping system that i dump into excel through a data connection and I need to calculate the total hours for a...
  • VBA
    Hello everyone, I need your help please. I just need VBA code to get my reports working. What I want to do is whenever these dropdowns are...
  • Help with formula to sum numbers prior to date
    Hello, I was hoping to get some assistance as I'm having trouble with this. Using my table below as an example, how could I write a formula which...

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
Top