Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Excel "IF" operation help!!

  • 01-09-2011 02:16PM
    #1
    Registered Users, Registered Users 2 Posts: 275 ✭✭


    My visual basic is pretty rusty and I am struggling to generate an IF test...

    What I want to do is fairly straightforward..... I have two columns which I want if to test but I cant seem to nest two tests within the logical test....

    here's what I want to do.... one column is no. purchased (1 or 2) second column is discount (yes or no)... what I had tried was...

    =IF(G2>1 AND H2=yes,"400",IF(G2>1 AND H2<>yes"440",IF etc...

    however even if I reduce it to

    =IF(G2>1 AND H2=yes,"400,"440") I am still getting an error....

    Is it possible to have a logical test comprising two separate tests? and if so how should it be parsed!!


Comments

  • Registered Users, Registered Users 2 Posts: 49 Mack_Attack


    To combine the two IF statements you mentioned, try the following:

    =IF(AND(A2>1,B2="Yes"),400,440)


  • Registered Users, Registered Users 2 Posts: 275 ✭✭jaybeeveedub


    perfect!! many thanks


Advertisement