row matching using IF

S

scubadiver

I have two sets of rows that I want to match on account number. I have
formatted them both to number if I subtract one from the other I get zero and
if I add them I get the sum but if I use the following

=IF(D2=L2,1,0)

I still get zero. Can someone explain?
 
B

Bob Phillips

Formatting only affects the look, not the underlying value.

The problem is probably the FP calculation. See if this helps

=IF((D2-L2)<0.000000001,1,0)

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
P

Pete_UK

Perhaps there is a very small difference between those values, such
that when you subtract one from the other you have a very small value,
but if the cell is formatted to show only integer values then it will
appear as zero - try increasing the number of decimal places
displayed.

Hope this helps.

Pete
 
S

scubadiver

thanks!

Bob Phillips said:
Formatting only affects the look, not the underlying value.

The problem is probably the FP calculation. See if this helps

=IF((D2-L2)<0.000000001,1,0)

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
Top