ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   macro to fill cells (https://www.excelbanter.com/excel-programming/443530-macro-fill-cells.html)

Fan924

macro to fill cells
 
I have a macro that clears an area "A1:Z100" of text. I would like to
add to it. How do I fill these cells with a single blank space without
doing a copy/paste?

Dave Peterson[_2_]

macro to fill cells
 
First, I think that this is a bad idea.

If you ever use formulas like:
=if(a1="","something","another thing")
then these will all break.

You may need to change to something like:
=if(trim(a1)="", ...

It could also break up any =counta() formulas and even how navigating the
worksheet (with End|UpArrow techniques).

But if you want...

activesheet.range("a1:z100").value = " "

(I wouldn't do this!)



On 08/19/2010 00:46, Fan924 wrote:
I have a macro that clears an area "A1:Z100" of text. I would like to
add to it. How do I fill these cells with a single blank space without
doing a copy/paste?


--
Dave Peterson


All times are GMT +1. The time now is 11:50 PM.

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