clearcontents

  1. E

    Clear Contents two cells to the left if input date is <

    Attempting to modify a MACRO that deletes rows based on input box date < criteria - that works great! Now need to just clear contents of cell two cells to the left and not an entire row. Not sure what needs to be done on this line: ActiveCell.Offset(0, -2).ClearContents - not working. Dates...
  2. G

    Help to ClearContents by Columns based on cell value

    Hi all, What i am looking to do seems simple enough but i just dont have the expertise to figure out the VBA for it, any help would be greatly appreciated! I would like to evaluate a cell (B7) where if the value = "SUN" or value = "SAT" and then clearcontents of range B9:B37 if that value...
  3. K

    ClearContents of the row if finds all 1's in it.

    Hi,</SPAN></SPAN> Sheet1 show the data in the columns C:P are filled with 1's in it. But the row 6, 7, 8, 9 has in it X or 2 filled, is it possible ClearContents (do not eliminate the rows) of the row in which has only 1's in it (for example row 10 to 22 row) </SPAN></SPAN> Note: filled row...
  4. C

    Simple ClearContents not working

    I can't figure out why this won't work. Can someone take a look? Private Sub ClearContents() Worksheets("Costing").Activate If Cells(7, 5).Value = "Other %" Then Cells(7, 7).ClearContents End Sub
  5. L

    Run Time Error 438 Object Doesn't Support this Property or Method

    Hello, I'm getting the error above when I try to run a macro to clear a report and reset things for the next time. Specifically it is supposed to unhide a sheet, turns off the advanced filter so the contents can be cleared, and hide the sheet again. I am running Excel 2016 on Windows 10. The...
  6. E

    Clear cell after 60 seconds vba

    Hi all, I want to clear cell "I15" after 60 seconds. I will be calling this sub within another sub. Probably being stupid but can someone see why the following isn't working? The cell is being cleared instantly. Sub ClearTimer() Dim StartTime As Single StartTime = Timer Do While Timer -...
  7. M

    VBA ClearContents changes formatting?

    OK for some reason while using a bunch of named ranges to clear out the data the borders get changed to the heavy border. So after a bunch of playing around with it I see that if I run the sub with nothing in the cells to clear it doesn't change any formatting. But I type something in the top...
  8. B

    Quick way to ClearContents of UserForm TextBoxes?

    I have several UserForms with many TextBoxes. To quickly ClearContents I've tried this which produces Object required error. Any suggestions? For i = 1 To TextBox.Count TextBox(i).ClearContents Next I
  9. W

    ClearContents Macro based on cell text value AND satisfy conditional formatting FORMULA

    I have extensive conditional formatting for an area on a (sheet) named "Data". I need to learn "how to", leave the conditional formatting alone, and on-demand... run a macro to ClearContents of ANY specific cells within the Range("AI101:AM" & lastRow) BUT ONLY when TWO conditions are met...
  10. V

    VBA Code Created In Excel 2016 Running Slowly

    Hi Guys, I m new to VBA ode and created a tool where I have code linked to a active x control button that clears certain cells in my xslm workbook. The problem I am having is the tool is running slowly once the button is clicked. Private Sub CommandButton13_Click() If MsgBox("Do you want...
  11. P

    ClearContent for drop-down fields

    Hi, I havecreated a template for my staff to use. I've written code that generates aunique sequence number and saves the file but I am having trouble when it comesto removing any information that may have been pre-existing on the form. I amcurrently using the ClearContents command but I've found...
  12. S

    Empty cell values when another cell value changes in Table environment

    Hi I have a Named Table "T_1" that follows the pattern below: <tbody> 1 2 3 4 5 6 7 8 9 2 3 Header1 Header2 Header3 Header4 4 Val1-a to empty when val1-a changes to empty when val1-a changes to empty when val 1-a changes 5 Val2-a val2-a1 to empty when val2-b...
  13. K

    Clearing Named Ranges Clears Entire Sheet

    I have a series of named ranges on a sheet. I want to clear the contents and not the formulas. When I run the below, it clears the named ranges and then clears the entire sheet. Also, if I have no constants, it gives me an error. Help! TIA. Private Sub CommandButton1_Click() On Error...
  14. S

    how to clear contents in VBA

    A newbie in VBA. I tried the below code but it didn't work. Sub clearcontents() thissheet.Range("a1:b2", "a5:b6", "a9:b10", "d4").clearcontents End Sub
  15. S

    ClearContents not working

    I am trying to run a Macro in Sheet1 which worked perfectly before. For reasons unknown to me, it is not working tonight and I get an error at the line ClearContents, RunTime Error 1004, ClearContents Method of RangeClass failed. As an aside, I am also having problems getting my computer to...
  16. B

    Need assistance with multiple ClearContents instances within Worksheet_Change

    I have two drop down lists. When the first drop down value is changed, the second automatically clears its value. I am performing this using the following: Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = Range("O2").Address Then Range("P2").ClearContents...
  17. S

    .ClearContents Redirects to Function

    Hi Everyone, So every time a line of code with .ClearContents is ran, the macro redirects to a Function, and then the function runs through a seemingly infinite loop (I don't have the patience to manually debug through it) which really slows down my macro since there are quite a few lines of...
  18. andrewb90

    Clear contents with vba

    Hi there, I am trying to use VBA to clear the contents of column B of the same row(s) as the cells selected. I just can't quite figure out how to get it right. If D5 was selected then B5 would be cleared. If F7:G8 was selected then B7:B8 would be cleared. Thanks, Andrew
  19. E

    Clear All Contents from Unprotected Cells Macro

    Hi all, I have a sheet that has many protected cells on it and then to the right of those protect cells are unprotected cells to put our daily usage totals in. After filling out the sheet we print it and then we need to clear the contents within the unprotected cells and start over for the next...
  20. T

    Clear contents of a selected range

    Hi :) I'm having problems trying to clear the contents in a range I selected. The code, say "w" is 10: Range("A2").End(xlDown).Select ActiveCell.Offset(1, 0).Select ActiveCell.Resize(w, 8).Select Range(Selection).ClearContents I tried that code and it doesn't seem to work, any ideas?

Some videos you may like

This Week's Hot Topics

Top