+ Reply to Thread
Results 1 to 8 of 8

How to Join "IF" statements together

  1. #1
    Registered User
    Join Date
    02-11-2013
    Location
    Copenhagen
    MS-Off Ver
    Excel 2007
    Posts
    58

    How to Join "IF" statements together

    Hi

    I have a sheet of data, which I need to write "IF" statements for:

    The Data is in the attached png file
    Ifstat.png

    In each row I need to check column H and column F the critiria, but there are many senario's I need to check, so I have writen 9 "IF" statements but I don't know how to join them together (Row 24 is used as an example, but there is many rows that I will need to copy this down to)

    IF(AND(H24=" a";F24="SEK");"DO NOT SEND";"OK"),
    IF(AND(H24=" b";F24="CAD");"DO NOT SEND";"OK"),
    IF(AND(H24=" c";F24=" JPY");"DO NOT SEND";"OK"),
    IF(AND(H24=" d";F24=" USD");"DO NOT SEND";"OK"),
    IF(AND(H24=" e";F24=" USD");"DO NOT SEND";"OK"),
    IF(AND(H24=" f";F24=" MXN");"DO NOT SEND";"OK"),
    IF(AND(H24=" g";F24=" EUR");"DO NOT SEND";"OK"),
    IF(AND(H24=" h";F24=" DKK");"DO NOT SEND";"OK"),
    IF(AND(H24=" i";F24=" NOK");"DO NOT SEND";"OK"),

    Please could somebody, tell me how to join these together?
    I even thought of using a table and a Vlookup, but my skill are to basis to be able to make this work.
    So, I think this would be the best way for me to do this.

    Thanks in advance

    Rob
    Last edited by Robert110; 02-26-2013 at 10:20 AM.

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: How to Join "IF" statements together

    hi Rob, see if the file helps. i created a table in L24:O32. column N is simply a combination of L & M. so if you can just live without L & M, you can copy & paste the values of column N & delete L & M. then i did a VLOOKUP with IFERROR like this in I24:
    =IFERROR(VLOOKUP(H24&F24,$N$24:$O$32,2,0),"OK")
    Attached Files Attached Files

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: How to Join "IF" statements together

    Hi Rob,

    From what you are describing you don't need a nested if statement but rather using AND to make sure all the criteria are correct:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Let me know if this works for you.

    abousetta
    Please consider:

    Thanking those who helped you. Click the star icon in the lower left part of the contributor's post and add Reputation.
    Cleaning up when you're done. Mark your thread [SOLVED] if you received your answer.

  4. #4
    Registered User
    Join Date
    02-11-2013
    Location
    Copenhagen
    MS-Off Ver
    Excel 2007
    Posts
    58

    Re: How to Join "IF" statements together

    Hi Benishiryo and Abousetta

    Thanks to you both for your quick response.

    Both these solutions work really well.

    This is great, Thanks again

    Rob

  5. #5
    Registered User
    Join Date
    02-11-2013
    Location
    Copenhagen
    MS-Off Ver
    Excel 2007
    Posts
    58

    Re: How to Join "IF" statements together

    Hi Guys,

    I have encountered a different problem with two if statements now and I don't seem able to get these to work in the right way.

    Ifstatementproblem.jpg

    I have the attacehd data, which has the first condition "If column I is empty then error message "Check - missing bank account" appears, if it has a number in it then "OK"

    For this I have made the is if statement =IF(I2="";"Check - missing bank account";"OK")

    But their is a second condtion that if column I is empty but column B has "No instruction required" then this is "OK" but if something other than "No instruction required" is in there then "Check - missing bank account" is shown.

    I have tried various "IF" and "AND" statement critia, but I just don't seem to be able to get the write result.

    Which I would like to be shown in column K.

    I know this is a basis thing, but I just don't seem to be able to get it right.

    Thanks in advance

    Rob

  6. #6
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: How to Join "IF" statements together

    Hi Robert110

    For your original question.
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    And for post #5, may be!
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Sustitute the comma for the semicolon.
    Regards Kevin


    Merged Cells (They are the work of the devil!!!)

  7. #7
    Registered User
    Join Date
    02-11-2013
    Location
    Copenhagen
    MS-Off Ver
    Excel 2007
    Posts
    58

    Re: How to Join "IF" statements together

    Thanks for your help

    Kevin

  8. #8
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: How to Join "IF" statements together

    Hi Robert110

    No problem and thanks for the feed back.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1