newbie formula question... can this be done?

J

jamescoats

I have to setup a worksheet where one criteria we're looking at is
whether or not two criteria are = (my criteria are whole numbers, 1 -
4). If they are equal, then I need a "Y" in the column, if they're
not, then a "N".. hopefully you get the gist. I'm sure I'm being clear
as mud.

So, if E2 is 1, and F2 is 1, then G2 would be "Y". If E2 is 1, and F2
is 3, then G2 would be "N".

Is there a way to do this?

Thank you for your consideration and help!

James
 
J

JE McGimpsey

One way:

=IF(E2=F2,"Y","N")

However, if E2 and F2 are calculated, then very small rounding errors
may give you an incorrect answer. It would be better to use something
like

=IF(ABS(E2-F2)<10^-10,"Y","N")
 
Top