IF statement question

Hi Gurus!
I'm getting all in a twist over nested IF statements.
Here's what I want to do.
I have three columns A, B and C.
There is a list in Columns A and B and a result in C, but with gaps in each list as under:

A
  B
  C
Fred
  Fred
  
George
  
  X

  James
  Y
Jones
  Jones
  
Smith
  Smith
  
What I'm looking for is a nested IF statement in Column C that says "if A=B do blank, otherwise do "X" OR, if A="" then do "Y"
I can do the first condition, but I'm running into trouble combining the second in one statement.

Hope that's clear!

Cheers
Gordon

Sorry that's all mucked up.
I'll post a link to this.
https://www.wuala.com/gordonbp/Public/

Hi Gordon,

You didn't specify what the value of col. C shou;d be if both A and B are blank.

Using =IF(ISBLANK(A2);"Y";IF(A2=B2;"";"X")) will put "Y" in there for above case.

Success,

Rob.

Gordon,

Working the other way around blanks C in case both A & B are blank.

=IF(A2=B2;"";IF(ISBLANK(A2);"Y";"X"))

Rob.

Hi Rob,
Thanks for that - worked perfectly.
I hadn't realised about ISBLANK......
If I'd found that I could have worked it out, but thanks anyway!

Cheers
Gordon