Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default I need a macro that will reset cells to zero

Does anyone have something I could use for the above?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default I need a macro that will reset cells to zero

If the cells in question have formulas, then you would need to alter the
input cells so that the formulas calculated to zero. If you want any cell
containing a numeric constant to be zero

Sub Resettozero()
Activesheet.usedrange.Specialcells(xlConstants,xlN umber).Value = 0
End Sub

--
Regards,
Tom Ogilvy
"Macro Beginner" <Macro wrote in message
...
Does anyone have something I could use for the above?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default I need a macro that will reset cells to zero

Hi,

Dim Rg As range
set rg=range("A1:A10")

'To assign Zero (0) ... or any other value to whole range:
Rg.Value= 0

'To clear the range and make it Empty:
'Rg.ClearContents

--
Regards,
Sébastien
<http://www.ondemandanalysis.com


"Macro Beginner" wrote:

Does anyone have something I could use for the above?

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
Reset Cells Value Arfa Excel Worksheet Functions 2 September 30th 09 08:05 AM
reset certain cells to a default value JcR Excel Worksheet Functions 1 June 7th 06 06:17 PM
Reset Macro Pastel Hughes Excel Discussion (Misc queries) 1 April 24th 06 10:41 PM
reset cells to 0 all at once Workshops New Users to Excel 1 February 20th 06 12:41 AM
reset cells 1vagrowr Excel Discussion (Misc queries) 8 December 21st 05 05:13 AM


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

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"