Simple Excel question

desteffy

Golden Member
Jul 16, 2004
1,911
0
0
Hi, Suppose I have a large matrix with either blank or nonzero entries and I want it to fill in all the blank entries with zeros, there has to be some simple way to do this, anyone know how?
 

theknight571

Platinum Member
Mar 23, 2001
2,896
2
81
Originally posted by: desteffy
Hi, Suppose I have a large matrix with either blank or nonzero entries and I want it to fill in all the blank entries with zeros, there has to be some simple way to do this, anyone know how?

I've got a Macro that will do it for the selected range...

To create the macro... from your worksheet:
- select Tools -> Macro -> Visual Basic Editor
- select Insert -> Module
- paste code into Module and save worksheet

To use the macro....
- select the range to fill with zeros
- select Tools -> Macro -> Macros
- select Fillblanks
- click Run

If there's a "built in" way, I haven't found it yet.
 

desteffy

Golden Member
Jul 16, 2004
1,911
0
0
Thanks for the help. Before I saw your reply I ended up using a solution that isnt quite as nice of making a large matrix of zeros, copying it, and doing the "Paste special..." and "add" that added the matrix of zeros to all the elements accomplishing the same task.