clear

  1. MFish

    VBA Clear/.value = ""

    I'm having an issue with VBA Clear Command Button. I have a textbox named, txtLoc (Location of my depot) and many more textboxes/comboboxes. I also have my clear command button named, cmdClear. I'm just trying to clear the data out of all my userform criteria but this code doesn't work...
  2. H

    Vlookup formula isn't working (and I don't know why.)

    I'm a flight simulator pilot, (which will help to explain the nature of the spreadsheets when you see them.) Anyway, I followed "Computergaga"'s tutorial on the web, which I found to be very good. However, even though I followed his instructions to the letter, it always returned a value of...
  3. H

    macro to Clear all Filters in certain sheets

    I have the following code to Clear Data form all Sheets named "CSA" Sub Clear_All_Values() Dim ws As Worksheet, sh As Worksheet Set ws = ActiveSheet If MsgBox("ARE YOU SURE YOU WANT TO CLEAR ALL AGENTS RESULTS?", vbYesNo, "CONFRIM") = vbYes Then Worksheets("CSA1").Select...
  4. Murman01

    ClearContents doesn't always work

    Hi, Using Excel 2016, I have a yearly workbook that is broken in to months, quarters, and year-to-date worksheets. At the start of each fiscal year (April to March), I want to give the user the ability to clear all of their data entries in the entire workbook at the click of a single...
  5. P

    Clear data by creiteria

    Hi to all of you, I would like use a vba code so that to run through col. “A” and where the find the text “Grand Total” then to clear any contents in adjacent cells’ range “B”: “J”. I present below an extract of original and expected result. Many thank in advance to all Original data...
  6. T

    Clear contents in table but leave columns with formulas

    Hi Guys, I have 2 tables one named 'Steve' and the Other named 'Dave'. Is there a way to use VBA to clear the contents of both tables but leave the formulas in columns R,S,T,U,V. At the moment i just select all rows from row 3 down (leaving the heading and row 2) and delete . I then paste...
  7. C

    Clear contents on certain sheets

    I have a workbook that has about 500 sheets (all different names, but end with the same letter) , I want to create 9 buttons to clear the same cells in each sheet but choose only certain ones for each button. For instance, button 1 will clear about 80 sheets, button 2 will clear about 40 and so...
  8. M

    VBA Clearcontents Databody Range except headers and formulas

    Hi I have this piece of code which won't work but I basically want to reference the table and clear databody range except formulas? With Sheets("CC Reconfiguration Data") .Range("B3").ListObject.DataBodyRange.SpecialCells _ (xlCellTypeConstants, 23).ClearContents End...
  9. M

    Reset Workbook VBA: Show all Data on Filters and clear contents from some sheet ranges

    HI, I have tried both below options to either show all data or remove filters in preparation for the workbook to be reused but neither work. On top of this I would like to clear contents in range A:W down to last entry on one sheet and a different range on another sheet. Both are in tables but...
  10. synergy16

    exclude a textbox from a clear all command button

    good morning all. if i am doing a "clear all" such as the code below, is there a way to do that and exclude a textbox from that? Dim ctl For Each ctl In Me.Controls If TypeOf ctl Is msforms.TextBox Then ctl.Text = "" End If Next ctl
  11. S

    Userform-vlookup/submit question

    I have a userform I've developed that has combo boxes that when selected fill a corresponding text box with a vlookup formula. Those work fine but the issue is when you hit the button to submit your entries into the sheet, I get an error because the cycle has started again and with no value in...
  12. K

    Change .onaction of a button created as part of a macro

    As part of a routine I create a button to perform an advance filter. With Sheets("Data").Buttons.Add(300, 0, 100, 25) .OnAction = "PO_Filterinplace" .Characters.Text = "View Supplier" End With Rather than having a separate clear filter button I would like to change this button when the...
  13. C

    LOOKUP,IF problem

    I need to retreive the value from the last non blank cell in a set of cells (not on the same row or column), so, I use this formula...
  14. E

    Clear multiple tables using arrays

    Hi all I have a number of tables that I want to clear as a fore runner for importing data from a number of workbooks. The code below works but it seems inefficient and believe it could be done better using an array. I am very confused on how Listobjects would work as part of a loop using...
  15. K

    Clear Contents below a dynamic Range

    Hi everyone hopefully this is a simple one but my limited VBA experience has me stumped. I want to clear the contents of columns a and b when a is blank. Below is the table of sample data i want to clear cells a4:b7, however this range need to be dynamic based off if column A is blank and b...
  16. kelly mort

    Clear range contents instead

    I want to clear the content from col B to N instead of deleting entire row. I can't make it happen. Can someone fix that for me? I have tried .Offset(1).EntireRow.ClearContents But did not work. With Range("B3:N"& Range("B" & Rows.Count).End(xlUp).Row) .AdvancedFilter...
  17. S

    Clear filters error

    I have a macro that clears all filters which works great if there are filters to clear. Otherwise I get an error message. Sub ClearFilters() ' ' ClearFilters Macro ' ActiveSheet.ShowAllData End Sub What can I add so if no filters are selected it will do nothing?
  18. S

    VBA Code to clear

    Hi I have the below code that deletes the dropdown next to it Private Sub Worksheet_Change(ByVal Target As Range) 'K5 Dropdown changes then clear l5 If Target.Address(0, 0) = "K5" Then Range("L5").ClearContents End Sub Howcan I edit the code to delete the below drop down...
  19. kelly mort

    Code Adjustment to clear contents from a range instead of deleting entire rows needed

    This code deletes the entire row. Now I want to clear just data from a given range intead. I want to clear data from T4:X & LastusedRow. V contains the dates. I have been trying to fix it but seems hard to read and understand it. Actually the dates are sorted in descending order. Sub...
  20. S

    Multiple Reset Buttons

    I have created an Active x control reset button on a worksheet to clear certain cells. I have tried to create another reset button, yet when I do, it has the same cells listed to clear, but doesn't work. And when I make changes to one button, it changes the contents of both. How can I create...

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