SOLVED

Formula assistance (IF Statment)

Copper Contributor

I have 3 columns: Column A has numeric values Column B has numeric values and empty cells.  Column C is there to calc Columns A and B.  I'm able to return a value between Columns A and B, if numeric values are present.  I'd like to turn 0 or nothing in Column C, if Column B is empty.

 

24 Replies
Hello,

Can you show us your formula or a file?

@toyawallace 

You may adopt this approach...

 

=IF(B2="","",<your calculation here if column B is not empty>)

 

Place the above formula in C2 and replace <your calculation here if column B is not empty> part with actual calculation you are doing if column B is not empty.

thanks, here's the formula: =IF(O16>=0,O16-N16)+IF(O16="",0)
Thanks, here's the calculation: =IF(O16>=0,O16-N16)+IF(O16="",0)
=IF(O16>=0,O16-N16)+IF(O16="",0) Thanks

@Subodh_Tiwari_sktneer 

Trying to reflect the following in column U:

If N is >= to 0, then N-O. 

If N has no value, then column U should be 0.

@toyawallace  would this work?

iferror( columnB - column A, 0)

@mtarler 

Hi, here's the formula to reflect to return a value if N>=0, and return 0, if there is no value in N.

=IF(O16>=0,O16-N16,IFERROR(O16-N16,0))

@toyawallace 

Did you upload a wrong file as there is no data in the columns you described?

 

In the file you uploaded, the cells in column B which look empty but actually they contain a space in them. Why?

If you select all the cells in column B which look empty and press Delete from the keyboard, you simply need the following formula...

 

In H8

 

 

 

=IF(B8>=0,B8-A8,0)

 

 

 

and copy it down.

 

 

=IF(O16>=0,O16-N1,0)

I apologize, I was providing an example in my first post.  In the actual file. I need the value to populate in Column U.  The columns to include the formula are O and N.  If the value in N is blank or no value at all, I'd like for U to be 0.  If the value in N>=0, then the value in U should be O-N.

Thanks, it's still returning a #Value

 

@toyawallace  not sure why it isn't working if I understand what you want:

=iferror(O16-N16,0)    

if you only want calculated if N>=0 then

=iferror(if(N>=0,O16-N16,0),0)

 

best response confirmed by mtarler (Silver Contributor)
Solution

@toyawallace 

You still have no data in columns you described in the latest file you uploaded.

Anyways, try one of the following formula depending which column actually contain the data.

=IF(ISNUMBER(B16),IF(B16>=0,B16-A16,0),0)

OR

=IF(ISNUMBER(N16),IF(N16>=0,O16-N16,0),0)

OR

=IF(ISNUMBER(B8),B8-A8,0)

OR

=IF(ISNUMBER(N16),O16-N16,0)

See which formula returns the desired output.

@Subodh_Tiwari_sktneer 

Hi there, you nailed it! :) 

This formula worked.  =IF(ISNUMBER(O16),IF(O16>=0,O16-N16,0),0)

Thank you so very much!!  

Stay healthy and Be Safe!

@toyawallace 

You're welcome! Glad it worked as desired.

 

Please take a minute to accept the post with the provided solution as a Best Response/Official Answer to mark your question as Solved.

 

Stay home and be safe.

show me an example of the IF statement.
Alden
1 best response

Accepted Solutions
best response confirmed by mtarler (Silver Contributor)
Solution

@toyawallace 

You still have no data in columns you described in the latest file you uploaded.

Anyways, try one of the following formula depending which column actually contain the data.

=IF(ISNUMBER(B16),IF(B16>=0,B16-A16,0),0)

OR

=IF(ISNUMBER(N16),IF(N16>=0,O16-N16,0),0)

OR

=IF(ISNUMBER(B8),B8-A8,0)

OR

=IF(ISNUMBER(N16),O16-N16,0)

See which formula returns the desired output.

View solution in original post