excel - Find the difference between two cells -


below example of excel sheet. in want find gain , loss using e , d cells. if e>d should calculate e-d , value should entered in f cell , if e

enter image description here

enter formula cell f2:

=if(e2 > d2, e2 - d2, "-") 

then enter formula cell g2:

=if(e2 <= d2, e2 - d2, "-") 

for row not gain or loss, - dash appear in column.


Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -