+ Reply to Thread
Results 1 to 15 of 15

Formula for a 3argument logic problem

  1. #1
    Registered User
    Join Date
    09-21-2018
    Location
    Poland
    MS-Off Ver
    2017
    Posts
    18

    Formula for a 3argument logic problem

    Hello dear forum member, I am having problem with creating a 3 argument logic formula.
    There are three columns 1,2,3. Formula that should put a letter F or - in column number 3 depending on logic in COLUMNS 1 and 2. Could anyone kind help me sort out this out?


    1) 2) 3)
    A 1 -
    A 2 -
    A 3 F
    B 4 -
    A 1 -
    A 2 F
    B 3 -
    A 1 -
    A 2 F
    A 1 F
    A 1 F

  2. #2
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Formula for a 3argument logic problem

    Hello and welcome to the forum.

    What is the logic that would make the 3rd column F?
    What is the logic that would make the 3rd column -?

  3. #3
    Registered User
    Join Date
    09-21-2018
    Location
    Poland
    MS-Off Ver
    2017
    Posts
    18

    Re: Formula for a 3argument logic problem

    There are 3 logic problems:

    1) 2) 3)
    A 1 -
    A 2 -
    A 3 F (F HERE BECAUSE NEXT ROW POSITION IN COLUMN 2 IS NEXT NUMBER AND ITS B IN COLUMN 1
    B 4 -
    A 1 -
    A 2 F (F HERE BECAUSE NEXT ROW POSITION IN COLUMN 2 IS NEXT NUMBER AND ITS B IN COLUMN 1)
    B 3 -
    A 1 -
    A 2 F (F HERE BECAUSE NEXT ROW POSITION IN COLUMN 2 IS AGAIN NUMBER 1)
    A 1 F (F HERE BECAUSE NEXT ROW POSITION IN COLUMN 2 IS AGAIN NUMBER 1)
    A 1 F and its a continuation..

  4. #4
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Formula for a 3argument logic problem

    Were we supposed to figure that out based on what you shared in post #1?

    Sorry, but I do not understand the logic here.

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

    Re: Formula for a 3argument logic problem

    Please try
    D1 =IF(OR(AND(B1+1=B2,A2="B"),AND(A2=A1,B2=1),B2=""),"F","-")

  6. #6
    Registered User
    Join Date
    09-21-2018
    Location
    Poland
    MS-Off Ver
    2017
    Posts
    18

    Re: Formula for a 3argument logic problem

    Once again:

    1) 2) 3)
    A 1 - (- HERE BECAUSE NEXT ROW IS A)
    A 2 - (- HERE BECAUSE NEXT ROW IS A)
    A 3 F (F HERE BECAUSE NEXT ROW POSITION IN COLUMN 2 IS NEXT NUMBER AND ITS B IN COLUMN 1)
    B 4 - (- HERE BECAUSE ITS B)
    A 1 - (- HERE BECAUSE NEXT ROW IS A)
    A 2 F (F HERE BECAUSE NEXT ROW POSITION IN COLUMN 2 IS NEXT NUMBER AND ITS B IN COLUMN 1)
    B 3 - (- HERE BECAUSE ITS B)
    A 1 - (- HERE BECAUSE NEXT ROW IS A)
    A 2 F (F HERE BECAUSE NEXT ROW POSITION IN COLUMN 2 IS AGAIN NUMBER 1)
    A 1 F (F HERE BECAUSE NEXT ROW POSITION IN COLUMN 2 IS AGAIN NUMBER 1)
    A 1 F and its a continuation..
    Last edited by Calios; 09-21-2018 at 12:55 PM.

  7. #7
    Registered User
    Join Date
    09-21-2018
    Location
    Poland
    MS-Off Ver
    2017
    Posts
    18

    Re: Formula for a 3argument logic problem

    Bo_RY - result is:

    A 1 -
    A 2 -
    A 3 -
    B 4 F
    A 1 -
    A 2 -
    B 3 F
    A 1 -
    A 2 -
    A 1 F
    A 1 F

    It doesn't match my needs, however its close - could you inspect it?

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

    Re: Formula for a 3argument logic problem

    Hi Calios,

    It works fine on my sheet.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    09-21-2018
    Location
    Poland
    MS-Off Ver
    2017
    Posts
    18

    Re: Formula for a 3argument logic problem

    BO_RY - its works great! However I missed one thing. Could you add one more thing - if its B after B after B after B it gives -? It seems to give F if its B after B after B.

    Thank you!

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

    Re: Formula for a 3argument logic problem

    Not sure what you mean, but try =IF(OR(AND(B1+1=B2,A2="B",A1="A"),AND(A1:A2="A",B2=1),B2=""),"F","-")

  11. #11
    Registered User
    Join Date
    09-21-2018
    Location
    Poland
    MS-Off Ver
    2017
    Posts
    18

    Re: Formula for a 3argument logic problem

    Bory - works great however still need a small change - my formula looks right now like this:

    =IF(OR(AND(V8+1=V9;S9="NIEZREALIZOWANY";S8="WYKONANY NIEZAFAKTUROWANY");AND(S8:S9="WYKONANY NIEZAFAKTUROWANY";V9=1);V9="");"FAKTURA";"-")

    Can we add to "NIEZREALIZOWANY" another criteria called "ZAMKNIĘTY" that will work the same way as "NIEZREALIZOWANY"?
    Thank you!
    Last edited by Calios; 09-22-2018 at 03:40 AM.

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

    Re: Formula for a 3argument logic problem

    Calios,
    What is the logic and result for "ZAMKNIĘTY"?

  13. #13
    Registered User
    Join Date
    09-21-2018
    Location
    Poland
    MS-Off Ver
    2017
    Posts
    18

    Re: Formula for a 3argument logic problem

    Bo_Ry - logic is exactly the same as for "NIEZREALIZOWANY"

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

    Re: Formula for a 3argument logic problem

    Then you can replace "NIEZREALIZOWANY" with "ZAMKNIĘTY" and add inside Or( )

  15. #15
    Registered User
    Join Date
    09-21-2018
    Location
    Poland
    MS-Off Ver
    2017
    Posts
    18

    Re: Formula for a 3argument logic problem

    Got it working - thank you so much!!!!
    You are the best.
    Last edited by Calios; 09-22-2018 at 05:23 AM.

+ 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. Logic formula problem
    By Ironhorse1211 in forum Excel General
    Replies: 4
    Last Post: 05-27-2014, 02:59 PM
  2. Logic Problem
    By TamH in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-18-2013, 11:21 PM
  3. Conditional logic problem
    By jparsons18054 in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 06-25-2012, 12:03 PM
  4. (Logic) Complicated formula-autofill problem
    By Maroosh in forum Excel General
    Replies: 1
    Last Post: 12-31-2010, 06:24 PM
  5. Problem leaving cell blank with double logic formula
    By healimonster in forum Excel General
    Replies: 2
    Last Post: 04-22-2010, 09:25 AM
  6. If formula logic problem
    By Yobari in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-13-2009, 11:03 AM
  7. Logic Problem
    By JOn Kunces via OfficeKB.com in forum Excel General
    Replies: 4
    Last Post: 07-14-2005, 12:05 PM

Tags for this Thread

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