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

1. ## 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.

2. ## 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. ## Re: If then statement?

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

4. ## Re: If then statement?

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

Formula:
`Please Login or Register  to view this content.`

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

5. ## 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. ## 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. ## Re: If then statement?

Originally Posted by brant.wheeler
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. ## 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.

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.

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