delete a range

  1. P

    VBA Clear data within range when a cell is changed. The cell is dependent on another cell on other sheet.

    Hi, i found this and applied: Private Sub Worksheet_Activate() If Range("S2") <> Range("A2").Value Then Range("S2") = Range("A2").Value Range("d2:g2").ClearContents End If End sub Where S2 is the cell that depends on another cell on other sheet (which means when S2 changes, d2:g2 clears). By...
  2. V

    How to delete multiple rows fast based on multiple conditions in column A and B?

    So I got a code that deletes rows based on 2 column conditions. However, it's very slow. I have about 60, 000 rows and this takes forever. Sub ClearOldest() OldestWeek = 34 OldestYear = 2018 i = 2 While Sheet5.Cells(i, "Q") = OldestWeek And Sheet5.Cells(i, "R") = OldestYear...
  3. E

    Column Delete if Header contains XXX

    I have a .CSV that I pull from SCCM. I convert it to .XLSX and then begin modifying it. I try to create my own macros when I can, but I seem to be stuck on something that I hope should be relatively simple. The report has a random number of columns and rows based on the required output. I need...
  4. M

    Range().Delete not working when I run macro from a different workbook

    I have a main workbook that I open that has code in it. when I run the code on that workbook it copies some data, opens a template workbook, pastes the data into the template workbook, runs a macro that is in the template workbook, and saves the template workbook with a new name and closes it...

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