Does anyone have something I could use for the above?
Does anyone have something I could use for the above?
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,xlNumber).Value = 0
End Sub
--
Regards,
Tom Ogilvy
"Macro Beginner" <Macro [email protected]> wrote in message
news:[email protected]...
> Does anyone have something I could use for the above?
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?
Hi Bastien.
I have formulas in those cells.
How can I do the same thing reset to zero but keep my formulas.
Andrew
Perhaps you missed that this thread is over 15 years old? I doubt anyone is still following it.
Also, Administrative Note:
Welcome to the forum.
We are happy to help, however whilst you feel your request is similar to this thread, experience has shown that things soon get confusing when answers refer to particular cells/ranges/sheets which are unique to your post and not relevant to the original.
Please see Forum Rule #4 about hijacking and start a new thread for your query.
If you are not familiar with how to start a new thread see the FAQ: How to start a new thread
1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
2. If your question is resolved, mark it SOLVED using the thread tools
3. Click on the star if you think someone helped you
Regards
Ford
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks