View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 1,726
Default Macro to clear cells of no value

Dim cell As Range
For Each cell In Selection
cell.Value = Trim(cell.Value)
Next cell


--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)


"justme" wrote in message
...
Hi,

I need a macro to find cells where the whole cell contains only a
space/spaces, and/or punctuation and replace with nothing.
I need to leave ditto marks (") alone, however, because I do have to deal
with those in another way.

Basically, a macro to set cell value to null if it does not contain any
capital or lower case alpha characters or numbers.

It won't let me use "Not Like "*[A-Z]*"...etc." ?

Thank you!