clear

  1. R

    Macro on multiple worksheets

    I have a simple macro assigned to a button used to clear the contents of a specific range of cells. My problem is that I would like to have the same button on multiple worksheets but the code i am using will clear all worksheets: Sub Clear_Cells()...
  2. E

    Screen Updating

    I have a macro that clears all of the cells in a workbook before I repopulate them with new data. The first step in the macro clears all of the Command Button captions. I then do an Application.Screenupdating=True I then carry on to clear all other cells. As these are being cleared they appear...
  3. gheyman

    Clear Cells in a Range

    I have a formula that goes down column Q. "=IF(AND(INDEX(C25,MATCH(RC15,C[7],0))=TRUE,COUNTA(R3C22:R230C22)=0),RC[-3],IF(AND(INDEX(C25,MATCH(RC15,C[7],0))=TRUE,COUNTIF(R3C22:R230C22,RC[-1])>0),RC[-3],""""))" I needed to copy paste values from range Q3:Q248 because once I get the formula...
  4. H

    Macro to clear Zeroes in Col A to C

    I have written code to clear zeroes in Col A to C I get a type mismatch when running the code and the following code is highlighted If .Cells(i, 1).Resize(, 2) = 0 Then See full code below Sub clear_Zero_Values() With Sheets(1) Dim lr As Long Dim i As Long lr =...
  5. S

    Clear contents of cells if it contains any text or number <2904 Loop

    I am trying to create a loop that will clear the contents in column A if the value is less than 2904 OR contains any text. I am struggling with the text portion of the loop. The text is different in each cell. This is what I have: Dim LastRow2 As Long LastRow2 = PLSR.Cells(Rows.Count...
  6. R

    Modify Clear Cells VBA to Multiple Worksheets

    I have the following code in place to clear cells the cells on a worksheet named "Production Allocation": Sub Clear_Cells() Range("e10:g12").ClearContents Range("e14:g22").ClearContents Range("e24:g25").ClearContents Range("e27:g48").ClearContents Range("e50:g50").ClearContents...
  7. John Caines

    alter sub to clear cells within a range

    Hello All. I very kindly maanaged to get a 'Clear Cells' sub from the board. (Thank you Fluff!) :-) The sub code is below; Sub ResetCells() With Selection .Font.Name = "Ariel" .Interior.Color = xlNone .Font.Color = vbBlack .ClearContents End With End Sub Is there...
  8. D

    Clear contents if 2 different conditions met

    Hi, I have the below code. Is there a way to edit this so that going down each row of a table, if cells in column I and column S of that particular row are both negative, then clear contents of those particular cells only? Application.ScreenUpdating = False For i = 1 To lastRow...
  9. C

    Clear a cell if duplicate VBA

    Please forgive my stupidity......I am trying to put forth the effort. Ok, I got this code to find a duplicate on another page, but what I have written doesnt work to clear the cell after it learned it was a duplicate. hear is my novice code. Sub askcompnum() Title = InputBox("Enter a...
  10. D

    Clear contents of certain cells if condition is met

    Hi, Going down a table with a dynamic number of rows - If cell G contains the word "Alpha" I want to clear contents in the cell that sits in column S of the same row. Eg. if cells G20, G34, G49 say 'Alpha' then the contents of cells S20, S34, S49 should be cleared. Is this possible? Thanks...
  11. R

    Clear Contents In VB

    Hello all! New to VB and have a question. I'm trying clear contents in one cell once a drop down is selected. I select a drop down that displays pricing in the the "System Pump" and "VFD Pricing " Cells. What I'd like it to do is clear just the contents in (VFD Pricing $) once "NO" is...
  12. A

    Clear Cell Content

    I'm using this code to clear a row (Column A - R), However, I like it to skip column "J"... Can someone assist. Thanks ActiveCell.Resize(, 18).ClearContents
  13. J

    VBA - for each clear cell

    Get a debug in the clear property Sub RCInclude2() Dim Cl As Range For Each Cl In Range("J2", Range("J" & Rows.Count).End(xlUp)) If InStr(1, Cl.Value, "Include", 1) > 0 Then Cl.Offset(, -2).Value.Clear end if end sub
  14. P

    Clear specific word VBA

    Hi all, kindly advise me so that to create a VBA code which should run through col. “E” and clear the specific word “Account:” but no other number or description. Therefore, that the code should run from “E2”. Below I present the original data and the expected result. Thanking you in advance...
  15. K

    VBA to clear contents or get data from another cell

    I've done some searching and can find ways to clear data from a cell but I need another variant. As an example: If Sheet1 A1 is 0 or blank, clear cell contents on Sheet2 A5. If Sheet1 A1 is greater than 0 then get cell contents from Sheet1 A2 and put it in Sheet2 A5. I can manually enter cell...
  16. A

    Clear Cell data with condition

    Hi.. I want to clear cells contents from column D to N When the cell in column A is empty for each row, or when I delete the cell from A coloumn
  17. K

    VBD clearning dependent dropdowns for entire sheet

    Hi, if someone could help, I'd greatly appreciate it. I've been working on this all week, and I can't find any solutions that fit my problem. I am using the following code and it works perfectly for Row 3 (first row of data entry). This sheet will go on forever as a living document so I need...
  18. P

    Clear cell if the date in the cell is less than a cutoff date

    Hello everyone, This is my first post and I have been stuck for a bit trying to find a solution. I am trying to clear any cell in column F if the date inside the cell is less than the current date minus 7 days. Also the cells in column F have formulas which calculate a date. What I tried so...
  19. E

    Clear Contents, Independent Instances; Separate Worksheet VBA

    Hello. New to the MrExcel. I'm currently building a form that requires separate instances of cells being cleared based on cells from other worksheets changing. Private Sub Worksheet_Change(ByVal Target As Range) 'When E1 changes, E2 clears, and c20, d20 .... j20 all clear. If...

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