Skip to main content

Post content has been hidden

To unblock this content, please click here

jelly baby

Excel Formula help

jelly baby, 11 October, 2008 at 17:47 Posted on Off Topic Posts 0 7

I should be able to work this out but I just can't. It should be so simple but I'm just not getting it right.

I want to write a formula that will basically check that both B2 and C2 are Y - if they are return Y, if they aren't return N.

I can do it if both B2 and C2 are the same but that doesn't take into account if they are both N. Argh ....

7 replies

Latest activity by jelly baby, 11 October, 2008 at 19:26
  • memyselfandi
    Beginner November 2007
    memyselfandi ·
    • Report
    • Hide content

    Would =IF(B2=C2, "Y", "N") work?

    • Reply
  • DDiva
    Beginner August 2009
    DDiva ·
    • Report
    • Hide content

    It sounds like you need to do a double IF IYKWIM but i'm not sure that even exists !

    All i can suggest is do 2 Ifs in sep columns to see if each is Y and then an if to see if they are the same, does that make sense ?

    • Reply
  • Mr JK
    Beginner
    Mr JK ·
    • Report
    • Hide content
    View quoted message

    Probably not, because that doesn't take into account the possibility of both B2 and C2 being N.

    This isn't especially elegant, but try =IF(IF(B2="Y",1)+IF(C2="Y",1)=2,"Y","N")

    • Reply
  • DDiva
    Beginner August 2009
    DDiva ·
    • Report
    • Hide content
    View quoted message

    That only says if they are the same not if they are both Y (ie they could both be N)

    • Reply
  • Baby Buns
    Beginner September 2007
    Baby Buns ·
    • Report
    • Hide content

    If you look in the help menu for a nested IF function, there's a lovely example there that you can cut and paste and change cell references / logic values to suit your needs

    • Reply
  • Fandango
    Beginner November 2007
    Fandango ·
    • Report
    • Hide content

    Sounds like you need the And argumentwhere you say And(this equals this, that equals that, etc, etc) So in this instance something along the lines of =IF(AND(B2='Y',C2='Y'),'Y','N')

    • Reply
  • Mr JK
    Beginner
    Mr JK ·
    • Report
    • Hide content

    Yup, that works too - and it's more elegant than mine.

    • Reply
  • jelly baby
    jelly baby ·
    • Report
    • Hide content

    Thank you folks. You'd never believe I've actually got a PGDip in Computer Science - I think all those years spent at 40,000ft and the added complication of pregnancy brain means that any logic I had has gone.

    • Reply

You voted for . Add a comment 👇

×


Related articles

Premium members

  • Q
    Qa Test I got married in August - 2022 North Yorkshire

General groups

Hitched article topics

Contest icon

Win £3,000 for your wedding

Join Hitched Rewards, where you can win £3,000 simply by planning your wedding with us. Start collecting entries, it's easy and free!

Enter now