Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 287
Default Range Change

I would like to have code to select a range of cells and change any cell
value that is <0 to 0.

Thanks,
Aaron
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Range Change

Sub changetoZero()
for each cell in selection
if isnumeric(cell) then
if cell.value < 0 then cell.value = 0
end if
Next
end sub

--
Regards,
Tom Ogilvy


"Aaron" wrote:

I would like to have code to select a range of cells and change any cell
value that is <0 to 0.

Thanks,
Aaron

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
How can change range to select active rows instead of :=Range("S10 ldiaz Excel Discussion (Misc queries) 7 August 29th 08 03:52 PM
How can I change range name definitions as the No. of rows change. [email protected] Excel Programming 1 June 20th 06 03:40 AM
How do I change a range name back to the underlying data range? Colin Excel Worksheet Functions 1 September 26th 05 05:55 PM
How can I dynamically change the range for Range("A1:M500")? Bij Excel Programming 3 August 25th 05 02:00 AM
Change cell colour for a cell or range within a predefined range Martin[_21_] Excel Programming 2 May 23rd 05 06:16 PM


All times are GMT +1. The time now is 09:04 AM.

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

About Us

"It's about Microsoft Excel"