Clear cells to a preset value

E

Emerogork

Is it possible to clear all values in a range of cells and have a "space"
value entered. I have seen that I can assign a macro to a button. Can this
be done in Excel 2003?

Emerogork
 
G

Guest

Yes, Hit the Macro recording button first and then you do you find and
replace, In the find box place an asterisk * and on the replace box just hit
the space bar once.
Open the Macro editor and you'll see the code syntax.
 
G

Gord Dibben

Why would you want each cell to a <space> charater in it?

But here's a macro.

Sub foo()
Dim cel As Range
For Each cel In Selection
cel.Value = " "
Next cel
End Sub


Gord Dibben MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top