+ Reply to Thread
Results 1 to 8 of 8

If then statement? [Show result only when it's >0]

  1. #1
    Registered User
    Join Date
    12-29-2015
    Location
    Wisconsin
    MS-Off Ver
    2010
    Posts
    9

    Unhappy If then statement? [Show result only when it's >0]

    I need to create an IF THEN formula for a cell. Basically this but needs to be translated into excel language:

    (F6-B2) only if the quantity is greater than 0

    Sidenote: I'd like to be able to drag the formula down a column as well. F changes but B2 should stay the same number.
    Last edited by 6StringJazzer; 03-29-2018 at 08:45 AM.

  2. #2
    Forum Contributor
    Join Date
    03-28-2018
    Location
    Houston, TX
    MS-Off Ver
    Microsoft Office Professional Plus 2016
    Posts
    127

    Re: If then statement?

    The formula would look something like this: =IF((F$6-$B$2)>0,[then do this],[else do this])

    [then do this] = this is where you put the value or formula you want to use if the condition is TRUE
    [else do this] = this is where you put the value or formula you want to use if the condition is FALSE

  3. #3
    Registered User
    Join Date
    02-11-2018
    Location
    Ohio
    MS-Off Ver
    2016
    Posts
    16

    Re: If then statement?

    If the quantity of what is greater than 0? F6 or B2 or after the calculation? Please specify.

  4. #4
    Forum Moderator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    365
    Posts
    16,444

    Re: If then statement?

    What result do you want if F6-B2 is less than or equal to zero?

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Replace "Not greater than zero" with whatever you want that result to be.

  5. #5
    Registered User
    Join Date
    12-29-2015
    Location
    Wisconsin
    MS-Off Ver
    2010
    Posts
    9

    Re: If then statement?

    The F6 and B2 cells are both greater than zero. If the result is greater than zero I'd like it to show in the cell, if it is not greater than zero (ex: negative) than I do not want it to show. B2 stays the same cell the entire time while F6 will change as the cell is drug down (ex: F7, F8, F9)

  6. #6
    Forum Contributor
    Join Date
    03-28-2018
    Location
    Houston, TX
    MS-Off Ver
    Microsoft Office Professional Plus 2016
    Posts
    127

    Re: If then statement?

    This sound like the formula you want: =IF(F6-$B$2>0,F6-$B$2,"")

    The double quotes will leave the output blank if the result is less than 0.

  7. #7
    Registered User
    Join Date
    12-29-2015
    Location
    Wisconsin
    MS-Off Ver
    2010
    Posts
    9

    Re: If then statement?

    Quote Originally Posted by brant.wheeler View Post
    this sound like the formula you want: =if(f6-$b$2>0,f6-$b$2,"")

    the double quotes will leave the output blank if the result is less than 0.
    thank you thank you!!!!!

  8. #8
    Forum Moderator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    365
    Posts
    16,444

    Re: If then statement? [Show result only when it's >0]

    rbiankowski, in hindsight I should have asked you to update your title. Your title was pretty generic and doesn't give any insight to your specific question. Since I responded myself without pointing out your title, and it is now solved, I updated it your title for you. As a new member, please read our rules before your next post.

    Your post does not comply with Rule 1 of our Forum Rules. Please update your title to tell us something about your specific question. Describe your problem, not your anticipated solution. We ask this for two reasons:

    1. Members scan the list of threads to decide where they can help. The title helps us decide which questions we have the knowledge to solve.
    2. After a question is answered, the title helps people with similar questions find it in a search.

+ 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. Replies: 2
    Last Post: 07-09-2015, 04:25 PM
  2. [SOLVED] If statement to select data - nested statement - assistance
    By petitesouris in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 06-29-2015, 09:55 PM
  3. compile error expected line number statement end statement
    By mattress58 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-18-2014, 10:12 AM
  4. VBA Compile Error : line number or label or statement or end of statement
    By excellearner121 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-04-2013, 06:41 PM
  5. Replies: 4
    Last Post: 06-01-2012, 10:05 AM
  6. Replies: 4
    Last Post: 05-16-2012, 05:33 PM
  7. [SOLVED] Utilize a Select Case Statement in Target Intersect Statement
    By max57 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-29-2009, 08:55 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