Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Clear blank cells
Hi,
I have a worksheet with cells that appear blank, but have an "apostrophe" in them when you edit the cell. How can I clear all of these cells? Thanks, Reed |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Clear blank cells
Select the cells in question and use the following macro:
Sub AAA() Selection.Clear End Sub -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Reed" wrote in message ... Hi, I have a worksheet with cells that appear blank, but have an "apostrophe" in them when you edit the cell. How can I clear all of these cells? Thanks, Reed |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Clear blank cells
Is it possible to make a macro that automatically selects the cells?
Thanks, Mike "Chip Pearson" wrote in message ... Select the cells in question and use the following macro: Sub AAA() Selection.Clear End Sub -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Reed" wrote in message ... Hi, I have a worksheet with cells that appear blank, but have an "apostrophe" in them when you edit the cell. How can I clear all of these cells? Thanks, Reed |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Clear blank cells
Phillip London UK
Sub SelectApostrophe() Dim rng As Range Dim cl as range For Each cl In Range("C1:C10") If Len(cl.Value) = 0 And Not IsNumeric(cl.Value) Then If rng Is Nothing Then Set rng = cl Else Set rng = Union(rng, cl) End If End If Next rng.Select End Sub Reed wrote: Hi, I have a worksheet with cells that appear blank, but have an "apostrophe" in them when you edit the cell. How can I clear all of these cells? Thanks, Reed |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Clear blank cells
Reed, following cleans cells containing ' or (multiple) spaces. Sub AlmostEmptyCleaner() Dim r As Range, c As Range, u As Range On Error Resume Next Set r = ActiveSheet.UsedRange.SpecialCells(xlConstants) On Error GoTo 0 If Not r Is Nothing Then For Each c In r If Trim(c.Formula) = vbNullString Then If u Is Nothing Then Set u = c Else Set u = Union(u, c) End If Next End If If Not u Is Nothing Then MsgBox "Cleaning " & u.Count & " cells" u.ClearContents Else MsgBox "Nothing to clean" End If End Sub -- keepITcool | www.XLsupport.com | keepITcool chello nl | amsterdam Reed wrote : Hi, I have a worksheet with cells that appear blank, but have an "apostrophe" in them when you edit the cell. How can I clear all of these cells? Thanks, Reed |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to write a macro that will clear validated cells to blank? | Excel Worksheet Functions | |||
How to clear 'blank' cells | Excel Discussion (Misc queries) | |||
Clear cell borders for blank white page | Excel Discussion (Misc queries) | |||
clear range of cells if another becomes blank | Excel Worksheet Functions | |||
How to clear the word '(blank)' from a cell in a Pivot Table | Excel Discussion (Misc queries) |