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

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
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,214,956
Messages
6,122,465
Members
449,085
Latest member
ExcelError

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