Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to write a macro that will clear validated cells to blank? JAbels001 Excel Worksheet Functions 3 November 20th 08 05:20 PM
How to clear 'blank' cells CaroleO Excel Discussion (Misc queries) 2 March 2nd 07 02:56 PM
Clear cell borders for blank white page john Excel Discussion (Misc queries) 0 February 21st 07 01:53 PM
clear range of cells if another becomes blank bgg Excel Worksheet Functions 3 January 17th 07 11:32 PM
How to clear the word '(blank)' from a cell in a Pivot Table Rob Conder Excel Discussion (Misc queries) 2 November 3rd 06 07:14 AM


All times are GMT +1. The time now is 07:20 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"