ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Clear cells to a preset value (https://www.excelbanter.com/excel-worksheet-functions/155572-clear-cells-preset-value.html)

Emerogork

Clear cells to a preset value
 
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


Michael

Clear cells to a preset value
 
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.
--
If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.




"Emerogork" wrote:

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



Gord Dibben

Clear cells to a preset value
 
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

On Thu, 23 Aug 2007 23:01:38 GMT, "Emerogork" <u36894@uwe wrote:

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




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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com