clear contents in vba

  1. D

    VBA - Split Source file-Find oldest date in column. Copy all rows with date to new sheet, Repeat on next oldest date. Also, remove some unwanted data.

    Creating new Post per developer request as requirements have changed. Old post: VBA - If unique value (ID) found in list, copy row to sheet2, if duplicate ID found, then paste first instance (based on date) to sheet 2, etc.. New Requirements: I have a Stock RSU source file that needs to be...
  2. M

    Need help with ClearContents

    Hello, I am trying to show blank cells instead of 0 for the whole worksheet. Here is what I've come up with: Private Sub Worksheet_SelectionChange(ByVal Target As Range) For Each cell In SomeRange If (cell.Value = 0) Then cell.ClearContents Next End Sub How do I get this to work? Thanks!
  3. C

    Clear Contents and Checkboxes Button

    Hello, I am trying to create a button in that will clear contents of E5:E8 and and also clear all checkboxes (located in D5:D8) on the sheet. I have the codes below but can't seem to get them to work together. Additionally, I cannot recall whether I created the checkboxes with activex or form...
  4. I

    Search A Spreadsheet For A string Value and clear contents in the 3 cells above it

    Any help would be appreciated on this as I am not an Excel\VBA programmer. I use SPSS daily at work which frequently results in generating excel SS's. I have a large table with cell counts of less than 5 and SPSS allows one to generate an excel table with the following text if the cell count...
  5. A

    VBA code to delete formula if result = zero

    I'm trying to reduce an Excel 2010 file in size by clearing the contents of cells where a formula has returned a zero value. I have found this VBA script which does the job but not very well for the data set I'm working with: Sub delzero() For Each Cell In [W12:BF24459] If Cell.Value = "0" Then...
  6. A

    Clear Contents in OffSet cell if value is below U1

    If a value in I is great than a value in U1 then I want to clear contents in P on the same row So I thought best way would be to use the offset value as I loop through the values... but excel moans about c.Offset(, 7).ClearContents But c.ClearContents works great but clears I Dim LastRow...
  7. D

    VBA code to delete contents in a range then prevent further input to the range until correct criteria is met.

    I have a dropdown in cell D8 which when selected populates a number of cells but nothing in column F. The dropdown has five options. Could anyone provide me with VBA coding that deletes content in a range in column F and then prevents people from inputting to that range unless the correct...
  8. P

    Deleting rows and columns resulting in black line

    I have a peculiar problem... I am trying to delete the contents of all the rows and columns beyond some row... I am using the below macro for that... The contents are cleared successfully but a black line is produced. Please help !!! Sub CLEAR_REPORT() Sheets("Report").Select...
  9. C

    Clear Contents of 2 ranges based on criteria

    I have a macro that pastes information copied from a main sheet ('Current Month') and pastes it into another sheet. What I'd like to do is to add code to go back to my 'Current Month' sheet and clear the contents of the cells that I copied. My only problem is that I can't just clear all cells in...
  10. S

    Macro to clear contents based on cell value

    I've searched the boards, and know the answer is right in front of me, but am stumped. Need VBA code for the following: Column J contains a list of 1's or 0's based on other cells data. The range begins in row 6 and continues to the end of the sheet (which can be variable in length - but never...

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