Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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!





  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 68
Default Macro to clear cells of no value

LOL Can't believe it was just TRIM!

Thanks so very much, Bob.!
:):):):):):):)
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
Macro to clear contents of certain cells MrAcquire Excel Discussion (Misc queries) 3 February 11th 10 05:25 PM
clear unlocked cells macro help please CandiC Excel Worksheet Functions 3 November 13th 09 11:37 PM
clear cells macro Dorothy Excel Discussion (Misc queries) 5 April 7th 08 12:46 AM
macro to clear cells press313 Excel Discussion (Misc queries) 0 May 24th 06 02:31 AM
Macro to clear cells Esrei Excel Discussion (Misc queries) 5 April 19th 05 01:52 PM


All times are GMT +1. The time now is 04:37 PM.

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"