# SolvedFormula Help - &IF

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

#### Jessihg12

I am currently pulling data from another worksheet in my workbook and subtracting the previous month's totals from the current month's totals to get the total new items (Jan totals 1100 & Feb totals 1,200 = 100 new items gained from Jan to Feb)
=Totals!E4-Totals!D4 (this formula is working correctly)
The problem is, in the next month's column, the formula reveals a large negative number because there is no data for that column yet. I'd like that column to be blank (or 0 - but preferably blank) if the return value is going to show negative. I am currently trying this formula, but it keeps returning "0" even if the output is positive - the "0" return is overriding the value of the subtraction.

=Totals!E6-Totals!D6&IF(F5<0,0,F5)

Please let me know if any of this is not clear or if you need more information.

#### etaf

Wayne
Moderator
not surehow your data is structured
BUT
=IF( (Totals!E6-Totals!D6)<0, 0, Totals!E6-Totals!D6)
is the sort of formula you may need

Please upload a small clean sample of your data / workbook (not a picture) to the forum, Make sure you have removed any private information, remember this is a public forum and so available to anyone
We would like to see an example of your data and also a manual mock up of the expected results you want to achieve.

#### Jessihg12

I have uploaded a sample of what the basics of this would look like. Please let me know if you have any questions. Thank you!

#### Attachments

• 13.1 KB Views: 2

#### etaf

Wayne
Moderator
=IF(Totals!C3="","",Totals!C3-Totals!B3)
in b2 and copy

if you want a zero in all the cells instead of a empty cell

change to
=IF(Totals!C3="",0,Totals!C3-Totals!B3)

#### Attachments

• 14.3 KB Views: 1

#### Jessihg12

Perfect; Thank you!

#### etaf

Wayne
Moderator
you are welcome

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

As Seen On