Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Need VBA code to periodically zero out 10,000 cells

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



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default Need VBA code to periodically zero out 10,000 cells

Hi:

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

Regards,

Vasant.


"lothario" wrote in message
...
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



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Need VBA code to periodically zero out 10,000 cells

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


--
Regards,
Tom Ogilvy


lothario wrote in message
...
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



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Need VBA code to periodically zero out 10,000 cells

Range("a1").resize(10000).value = 0
or
range("a1:a10000").value = 0




lothario wrote:

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

------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/


--

Dave Peterson

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Need VBA code to periodically zero out 10,000 cells

Thank you very much.



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formulas not calculating periodically amted88 Excel Discussion (Misc queries) 4 May 21st 10 02:56 PM
How do I have Excel automatically save a file periodically? [email protected] Excel Discussion (Misc queries) 3 October 20th 09 09:47 PM
formula to update dates periodically Graham New Users to Excel 3 April 15th 08 03:17 AM
Periodically listing files in a folder haven104 Excel Discussion (Misc queries) 2 January 10th 06 09:01 AM
Periodically exporting Excel sheet to HTML SupportX New Users to Excel 1 July 4th 05 07:00 PM


All times are GMT +1. The time now is 05:19 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"