+ Reply to Thread
Results 1 to 7 of 7

Help with a complex formula.

  1. #1
    Forum Contributor
    Join Date
    05-05-2004
    MS-Off Ver
    Office 365
    Posts
    651

    Help with a complex formula.

    I have uploaded a sample of what I am trying to accomplish.

    1) if A (the quantity used to make this product) its greater than C (the inventory we have on file) AND B (the name of the product being looked up is present. Sometimes it will be blank) AND D is YES have it respond with a 0 in E.

    2) if A (the quantity used to make this product) its greater than C (the inventory we have on file) AND B (the name of the product being looked up is present. Sometimes it will be blank) AND D is NO have it respond with a 1 in E.

    3) if A (the quantity used to make this product) its less than C (the inventory we have on file) AND B (the name of the product being looked up is present. Sometimes it will be blank) have it respond with a 1 in E.

    4) if B="" respond with a 0 in E.

    If you are wondering why I am using "0" as a positive result it is because there are many more parts used to make the sets so there might be 5 or 10 or 20 of these Flag checks. Ultimately then I will do a =sum of all of the flags and if that SUM is not 0, it means the set can not be made.

    Thanks for your help with this.
    Attached Files Attached Files

  2. #2
    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,003

    Re: Help with a complex formula.

    A rather larger sample would be appreciated.
    Last edited by JohnTopley; 04-16-2021 at 12:36 PM.

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,893

    Re: Help with a complex formula.

    It would be easier with a range of examples (instead of one) that covers all the bases, but try this:

    =IF(OR(B3="",AND(A3>C3,B3<>"",D3="Yes")),0,1)
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  4. #4
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Help with a complex formula.

    Maybe try

    =(B3>"")*OR(A3<C3,D3="No")

  5. #5
    Forum Contributor
    Join Date
    05-05-2004
    MS-Off Ver
    Office 365
    Posts
    651

    Re: Help with a complex formula.

    I have uploaded more examples

    1: Col B is yes because all 4 set items are available.
    2: Col B is no because the first product needs 4 items and only 2 are avalable.
    3: Col B is yes because the 3 parts needed all have available quantity and the 4th item is not used.
    4: Col B is yes because the 2 parts needed have availability and the other two item slots are not used.
    5: Col B is no because the fabric needed in the 2nd part is out of stock.

    I hope this help!
    Attached Files Attached Files

  6. #6
    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,003

    Re: Help with a complex formula.

    Try Glenn's formula in Post #3

    It returns 1 for YES, 0 for NO is posted file,
    Attached Files Attached Files

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,917

    Re: Help with a complex formula.

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however the thread title does not really convey what your request is about. Tell us what you are trying to do, not how you think it should be done.

    Please take a moment to amend your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).

    Please see Forum Rule #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.

    (Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ 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. Complex IF/THEN Formula
    By schapauy in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-21-2021, 06:14 PM
  2. [SOLVED] Complex If/Then Formula
    By willhh3 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 08-07-2018, 01:37 PM
  3. [SOLVED] Complex formula getting moer complex
    By Trebor777 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-02-2017, 01:39 PM
  4. [SOLVED] Use an existing cell formula for creating a new more complex formula
    By dubcap01 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-23-2014, 07:41 AM
  5. Replies: 4
    Last Post: 02-03-2014, 12:47 AM
  6. Complex IF Formula
    By elanum in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-26-2013, 09:16 AM
  7. Complex formula?
    By Jean in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-16-2005, 08:05 PM

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