+ Reply to Thread
Results 1 to 9 of 9

Combining IF AND formulas

  1. #1
    Registered User
    Join Date
    08-21-2015
    Location
    London
    MS-Off Ver
    2010
    Posts
    27

    Combining IF AND formulas

    Hi,
    I have 6 separate IF AND statements and I want to consolidate them into one single formula but I don't know how to do this. The formulas are:


    =IF(AND(F2="NACK Received",H2=H1,C2<C1),"YES", "NO")
    =IF(AND(F2="ACK Received",H2=H3,C2>C3),"YES", "NO")
    =IF(AND(E2="EXPIRY",H2=H1,C2<C1),"YES", "NO")
    =IF(AND(E2="TERMINATION",H2=H1,C2<C1),"YES", "NO")
    =IF(AND(E2="TRADE_CANCEL",H2=H1,C2<C1),"YES", "NO")
    =IF(AND(E2="UNVERIFIED",H2=H1,C2<C1),"YES", "NO")

    IS there any way to do this?

    Any help would be greatly appreciated.

    Thanks,
    Tom

  2. #2
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,937

    Re: Combining IF AND formulas

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If I helped, Don't forget to add reputation (click on the little star ★ at bottom of this post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)

  3. #3
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: Combining IF AND formulas

    Please Login or Register  to view this content.
    I think it should be the above but Im getting a "Problem with your formula" error that I cant quite suss out.
    Last edited by pjwhitfield; 09-04-2015 at 07:19 AM.
    If someone has helped you then please add to their Reputation

  4. #4
    Registered User
    Join Date
    08-21-2015
    Location
    London
    MS-Off Ver
    2010
    Posts
    27

    Re: Combining IF AND formulas

    Thanks a Million guys this works perfectly! Didn't realise it was a simple as combining all of them!

  5. #5
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,937

    Re: Combining IF AND formulas

    Glad it helped you. Sometimes it happen Pls mark it as solved.

  6. #6
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: Combining IF AND formulas

    Out of interest though, does anyone know why this doesnt work? rather than Nesting the IFs, putting them in as OR statements?

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    08-21-2015
    Location
    London
    MS-Off Ver
    2010
    Posts
    27

    Re: Combining IF AND formulas

    That has worked great but when i try and incorporate this formula into a macro i get a run time error 1004...

    ANy ideas on how i can bring it into a macro?

  8. #8
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,208

    Re: Combining IF AND formulas

    try(not macro solution)

    =IF(AND(OR(E2="TERMINATION",E2="TRADE_CANCEL",E2="UNVERIFIED",E2="EXPIRY",F2="NACK Received"),H2=H1,C2<C1),"YES",IF(AND(F2="ACK Received",H2=H3,C2>C3),"YES","NO"))

    Post macro.

  9. #9
    Registered User
    Join Date
    08-21-2015
    Location
    London
    MS-Off Ver
    2010
    Posts
    27

    Re: Combining IF AND formulas

    Please Login or Register  to view this content.
    That's the formula I've been using and it works fine apart from when I try and record it as part of a macro.


    It appears like this in the macro code and when i try and run it, it gives me a runtime error 1004.

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Combining IF and OR formulas
    By Scuba*33 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-31-2013, 01:11 AM
  2. combining two formulas
    By taker418 in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 06-07-2013, 01:18 PM
  3. Too many IFs - combining few formulas into one - need help
    By vemix in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-24-2013, 01:42 PM
  4. Combining IF and AND formulas
    By regularguy in forum Excel General
    Replies: 3
    Last Post: 09-14-2010, 07:21 PM
  5. Combining IF formulas
    By donyc in forum Excel General
    Replies: 4
    Last Post: 09-09-2010, 05:42 PM
  6. combining 2 formulas
    By cat1410 in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 08-02-2008, 09:34 PM
  7. Combining 2 Formulas
    By cjacks9 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-04-2007, 10:18 AM

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