Need VBA code to periodically zero out 10,000 cells

L

lothario

Hi,

I have 10,000 cells that need to be zero-ed out periodically.

Can you give me some VBA code that I can attach to a "Zero Out"
button?

So every time the "Zero Out" button is pressed the cells in the range
a1:a10000 are will be assigned the value of zero.

Thanks,
Luther
 
T

Tom Ogilvy

Sub ZeroOut()
Range("A1:A10000").Value = 0
End Sub

or if you want to make them blank

Sub ClearOut()
Range("A1:A10000").Clearcontents
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top