Macro to insert "Space" in blank cells

ronanmg

New Member
Joined
May 14, 2002
Messages
30
Hi all,

I have a problem in that I have a range of cells which are blank and are causing problems when linking with another program. I found it works when I place a space in a blank cell.

Does anyone know some macro code which will look at a range of cells A1:M5000, see if there is no entry in the cell, and if not place a space in the cell?

Any help welcome!
Cheers
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
This will do it after you select the range:<pre>

Sub InsertBlanks()

Selection.Value = " "

End Sub</pre>

However, it would be better if we could fix the command you are having trouble with...
would you be willing to post it?


_________________
JRN

Excel 2000; Windows 2000
This message was edited by Jim North on 2002-08-22 09:50
 
Upvote 0
Select your range,
Menu, Edit, Replace
Type a space in the Replace box
Click on Replace All button

_________________
Curiosity may have killed the cat but...
satisfaction brought it back. >^;^<
This message was edited by klb on 2002-08-22 10:07
 
Upvote 0

Forum statistics

Threads
1,215,051
Messages
6,122,871
Members
449,097
Latest member
dbomb1414

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top