Results 1 to 14 of 14

Macro To Update < 1 to 0

Threaded View

jo15765 Macro To Update < 1 to 0 02-27-2012, 03:58 PM
MaczaQ Re: Macro To Update < 1 to... 02-27-2012, 04:05 PM
jo15765 Re: Macro To Update < 1 to... 02-27-2012, 04:09 PM
MaczaQ Re: Macro To Update < 1 to... 02-27-2012, 04:13 PM
jo15765 Re: Macro To Update < 1 to... 02-27-2012, 04:20 PM
MaczaQ Re: Macro To Update < 1 to... 02-27-2012, 04:23 PM
jo15765 Re: Macro To Update < 1 to... 02-27-2012, 04:25 PM
MaczaQ Re: Macro To Update < 1 to... 02-27-2012, 04:29 PM
jo15765 Re: Macro To Update < 1 to... 02-27-2012, 04:32 PM
jo15765 Re: Macro To Update < 1 to... 02-28-2012, 09:03 AM
OnErrorGoto0 Re: Macro To Update < 1 to... 02-28-2012, 09:19 AM
jo15765 Re: Macro To Update < 1 to... 02-28-2012, 09:22 AM
OnErrorGoto0 Re: Macro To Update < 1 to... 02-28-2012, 09:26 AM
jo15765 Re: Macro To Update < 1 to... 02-28-2012, 09:57 AM
  1. #1
    Forum Contributor
    Join Date
    06-18-2010
    Location
    USA
    MS-Off Ver
    Excel 2016
    Posts
    546

    Macro To Update < 1 to 0

    I need a macro that will if the Value of the cell is < 1 update that cell to 0. I tried using the below, and it didn't work
    ub ResetAll()
    Dim myRng As Range, c As Range
    Set myRng = Sheets("Sheet1").Range("D73:D83")
    For Each c In myRng
    If c.Value > 1 AND c.Value < 0 Then
    c.Value = 0
    End If
    Next
    End Sub
    Last edited by jo15765; 02-28-2012 at 09:58 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1