1. R

    Macro to refresh workbook, clear sheet, refer to path and import columns

    Hi, In my worksheet, I would like to add a macro which does the following at once: 1) refresh the active workbook, 2) clear the contents of a specific worksheet, 3) import columns data from a closed workbook, 4) refer to the path of the closed workbook based on cell data in the open workbook...
  2. A

    Range.Clear fails when range empty

    Hello. I am making a macro that fills in par of a range. However, the size of the total filled range is variable. I would like to start by clearing a large range before filling a smaller section. However, on the first iteration, the range is totally empty, and I get an error. Is it possible to...
  3. J

    ClearContent in range instead of EntireRow row

    I need some help to fix this code to copy and clear content only in a range instead of copying and clearing the whole row. What the code does now, is that if column "I" is greater than column "J", in row 2-14, it copys the rows and PasteSpecial from row 16 and onwards. I want to copy only...
  4. G

    Macro Clear Button

    I have created a clear button on my sheet to reset certain cells to 0 etc. However in some of the cells formulas are also being deleted. Can someone tell me how to correct this problem, leave the formulas intact. Thanks all GT
  5. R

    Clear All Permissions in Data Source Settings Using VBA

    Sounds simple but I cannot find any information on how to clear all permissions in Data -- > Get Data -- > Data Source Settings --> Clear Permissions --> Clear All I have trawled the internet for a while but sadly to no avail. If anyone could atleast tell me where in the object model I can...
  6. G

    Clear Columns from "F" to the Very End

    Columns("F:XFD").Select Selection.Clear Hello All, The code above is working to clear all the cells. However, I would like to use another way instead of just referring to Column XFD to find the very end column. Is there another way to select all columns from "F:to the end" and instead of...
  7. A

    VBA clear contents (number and date formats) but keep format

    Hello, I appreciate if somebody please help me with how it's better to clear contents but preserve formatting. I have a data with dates and numbers. When I use Sheet.Range ("A2").CurrentRegion.Delete this preserves formatting for numbers but does not preserve for dates. When I use Sheet.Range...
  8. J

    Clear cells if

    Hi, I'm looking for a code to delete cells C2:AE2 if AB2="TRUE". I need this for each row down to 2000 - so clear C100:AE100 if AB100-"TRUE" etc. Can someone help with this? Many thanks Jim
  9. P

    Clearing worksheets

    I have a file that i was wondering if there was a way to write this code differently or easier. The file has 7 worksheets and a button page. i want to clear all worksheet and end up on cell A2 of the button page. Here is the code: Dim sht As Worksheet For Each sht In ActiveWorkbook.Sheets...
  10. T

    VBA to clear duplicate dates in column but keep row

    Good morning, Please help me out with macros that would cleared out duplicate dates on column A but keep all rows. For example clear out the one I have it in red. <tbody> A B C D 1 10/15/2019 lesson plans TBA TBA 2 10/15/2019 homework TBA TBA 3 10/15/2019 extra credit TBA TBA 4...
  11. P

    How to Clear a JSON file

    Does anybody know what the command is to reset / clear / refresh a JSON file before the file is loaded with another set of data? Thanks. :)
  12. L

    clear all the data

    vba is placed in a seperate file macro.xlsm my file name sample1.xlsx we have to open the file by vba and clear all the data of sheet1 and save and close the file all files are loacted in same place
  13. L

    clear the data

    my file name is 1.xlsx and sheet name can be anything vba will be placed in a macro.xlsm code has to open the file and clear all the data in column B and save and close the file
  14. R

    how to extract only character's ???

    i have a doubt how to extract only characters from a set of word using only excel ex john17son1992born premkumar12from560077 king0295of99theking how to get output as johnsonborn premkumarfrom kingoftheking please clear my doubt
  15. H

    VBA Excel: Clear the entire col expect A1

    Need some help, How to Clear the entire col expect A1 ? The column contain data & empy so i want to clear the whole column except a1 btw, i had column A column C column D column E column I column J column K need to clear
  16. 3

    Clear filter in Macro

    HI Guys, I have this macro currently to open a closed workbook and copy certain columns to active workbook then close. I would like the opening of the new workbook not to show up, and it must update as I have it. Although my macro does not work if filters are In place, can anyone help me add in...
  17. S

    VBA Clear Content based on certain value

    hi all I have a column with a formula and want VBA to clear those cells taht contain the #Value ! error.. I put together below code, which doesn't error but also doesn't do what I want it to do? Dim find As String find = "#Value !" Select Case find Case Cells(2, 3).Value...
  18. C

    If cell contains specific text then clear contents of a different cell

    If Cell B1 contains specific text, example "In", how to have it automatically ClearContents of Cell A1? would like to make this work for a range of cells if G3:G12 contain the word "In" then have them clear the corresponding C3:C7. Is this possible through Conditional formatting or is a Macro...
  19. P

    Dim as WSS, set multiple sheets as variables, give separate command for each sheet

    Hello, I am attempting to put together code that will clear a range of cells from one worksheet, and then a separate range from another worksheet afterward. I'm getting a compile error, "wrong number of arguments/invalid property assign". I am not exactly clear on how to set the worksheets as...
  20. M

    VBA Code to clear contents Not formulas on spreadsheet

    Hi can anyone help please, I have the following code that clear the contents as well as the formulas on my spreadsheet. Can any tell me please how not to clear the formulas . Thanks Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) 'Modified 6/18/2019 3:09 PM...
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

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
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 "".
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