+ Reply to Thread
Results 1 to 3 of 3

Increase until certain value

  1. #1
    Registered User
    Join Date
    04-10-2015
    Location
    Istanbul
    MS-Off Ver
    Office 2013
    Posts
    5

    Increase until certain value

    My same old macro works ok having a negative number affect my other formulas ? How can I limit the value drop below zero?


    Sub Low()
    Range("D4").Value = Range("D4").Value - 1
    End Sub

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,164

    Re: Increase until certain value

    Perhaps

    Sub Low()
    Range("D4").Value = ABS(Range("D4").Value - 1)
    End Sub
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Increase until certain value

    Hi Ferohers

    If I understand, perhaps this
    Please Login or Register  to view this content.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] incremental increase in a cell based on value increase in another cell
    By umuni in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 12-18-2014, 05:23 AM
  2. Replies: 3
    Last Post: 09-18-2012, 01:01 AM
  3. Replies: 2
    Last Post: 07-12-2011, 11:08 AM
  4. [SOLVED] HELP - 5% INCREASE
    By sjuncker in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-12-2006, 12:02 AM
  5. Increase A2 by 15%
    By Kellytwh in forum Excel General
    Replies: 2
    Last Post: 09-02-2005, 01:05 PM

Tags for this Thread

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