+ Reply to Thread
Results 1 to 34 of 34

If Formula with 3 Logic didn't Work

Hybrid View

  1. #1
    Registered User
    Join Date
    02-07-2022
    Location
    Bekasi, Indonesia
    MS-Off Ver
    365
    Posts
    26

    Question If Formula with 3 Logic didn't Work

    So i'm trying to create formula based on 3 logic


    On the Stock detail 07 Feb 2022 sheets column Q the logic is:
    1. If cells Q7 is match with X7:BF7 then:
    2. The E7:F7 must be match with 'ODC'!C2:C28
    3. Column G sheet ODC on the exact row must be greater than 0
    then either it's "OK" or "CHECK"
    or if it didn't match criteria 2 and 3 its "-"

    I'm trying to use
    =IF(MATCH($Q$5,ODC!$B$1:$B$28,0),IF(AND(ISNUMBER(MATCH(E7:F7,ODC!$C:$C,0)), --(ODC!$G$1:$G$28>0)),"YES","CHECK"),"-")
    This is the document
    Attachment 767120

    I'll be glad if someone willing to help me
    Last edited by poncosh98; 02-09-2022 at 01:47 AM.

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,598

    Re: If Formula with 3 Logic didn't Work

    There are instructions at the top of the page on how to post a sample sheet.Thanks

  3. #3
    Registered User
    Join Date
    02-07-2022
    Location
    Bekasi, Indonesia
    MS-Off Ver
    365
    Posts
    26

    Re: If Formula with 3 Logic didn't Work

    Sorry sir i think i'm already attached it
    Last edited by AliGW; 02-08-2022 at 04:46 AM. Reason: PLEASE don't quote unnecessarily!

  4. #4
    Registered User
    Join Date
    02-07-2022
    Location
    Bekasi, Indonesia
    MS-Off Ver
    365
    Posts
    26
    The attachment is below the code
    Last edited by AliGW; 02-08-2022 at 04:47 AM. Reason: PLEASE don't quote unnecessarily!

  5. #5
    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
    30,675

    Re: If Formula with 3 Logic didn't Work

    No workbook attached: follow the instructions in the yellow banner at top of the thread.
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,205

    Re: If Formula with 3 Logic didn't Work

    You did, but it's not a SAMPLE workbook. Far too much data there for your helper to work with. It needs to be simplified to enable testing and checking.

    A good sample workbook has just 10-20 rows of representative data that has been desensitised. It also has expected results mocked up, relevant cells highlighted and a few explanatory notes.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  7. #7
    Registered User
    Join Date
    02-07-2022
    Location
    Bekasi, Indonesia
    MS-Off Ver
    365
    Posts
    26

    Re: If Formula with 3 Logic didn't Work

    Can people help me first before correcting my procedure of submitting attachment I already submitted it.. The data is already get cut so much. I only add the category of MENSPORT in the table. And in fact people only need to take a look at column Q to realize it isn't that confusing..

  8. #8
    Registered User
    Join Date
    02-07-2022
    Location
    Bekasi, Indonesia
    MS-Off Ver
    365
    Posts
    26

    Re: If Formula with 3 Logic didn't Work

    Like i'm sorry if i'm wrong and not giving the best procedure of submitting attachment. But it is literally there and all help that i can use is people to take a look at it

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,205

    Re: If Formula with 3 Logic didn't Work

    The attachment link simply won't work in some browsers. You should attach file by following the instructions in the yellow banner at the top of the page.

    Your sample workbook should also include some MANUALLY CALCULATED expected results: sharing a non-working formula does not get us very far.

    Had you followed advice given, you'd have had a solution by now. As it stands, your expectation that you should NOT have to amend anything is precisely the reason why you haven't yet been helped. Your choice, of course.

  10. #10
    Registered User
    Join Date
    02-07-2022
    Location
    Bekasi, Indonesia
    MS-Off Ver
    365
    Posts
    26

    Re: If Formula with 3 Logic didn't Work

    This is the new document. I've cut the Stock detail sheets to 20 rows
    Attached Files Attached Files
    Last edited by poncosh98; 02-08-2022 at 07:16 AM.

  11. #11
    Registered User
    Join Date
    02-07-2022
    Location
    Bekasi, Indonesia
    MS-Off Ver
    365
    Posts
    26

    Re: If Formula with 3 Logic didn't Work

    Quote Originally Posted by AliGW View Post
    The attachment link simply won't work in some browsers. ...
    Please help to check Stock detail 07 Feb 2022 on column Q maam
    Last edited by AliGW; 02-08-2022 at 07:17 AM. Reason: PLEASE don't quote unnecessarily!

  12. #12
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,205

    Re: If Formula with 3 Logic didn't Work

    I can't see where you have shared the results you are EXPECTING. Please add these. Thanks.

  13. #13
    Registered User
    Join Date
    02-07-2022
    Location
    Bekasi, Indonesia
    MS-Off Ver
    365
    Posts
    26
    Quote Originally Posted by AliGW View Post
    I can't see where you have shared the results you are EXPECTING. Please add these. Thanks.
    I'm expecting the formula to show:
    1. "OK" if the data on Formula Q5 the same as Store on ODC, having a higher value ideal than 0% (column G ODC), and based on the same category (E7:F7 must be match with 'ODC'!C2:C28).
    2. "CHECK" if all the logic is okay but the value ideal is below 0% (Column G ODC).
    3. "-" if there's no category matches between stock detail and ODC sheets.

    I'm expecting your help ma'am, thank you so much for consuming your time for me

  14. #14
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,205

    Re: If Formula with 3 Logic didn't Work

    Attachment updated, but not with the information requested. I'll try again.

    We need to know what results you want here:

    AliGW on MS365 Insider (Windows) 64 bit

    Q
    5
    W10
    6
    ODC
    7
    CHECK
    8
    CHECK
    9
    CHECK
    10
    CHECK
    11
    CHECK
    12
    CHECK
    13
    CHECK
    14
    CHECK
    15
    CHECK
    16
    CHECK
    17
    CHECK
    18
    CHECK
    19
    CHECK
    20
    CHECK
    Sheet: Stock detail 07 Feb 2022

    DO NOT show us the results of a formula that you know is not working. Instead, manually type in the results you want to see for the 20 rows of data provided. Thanks.

    Someone else will pick this up - I've run out of time for now.

  15. #15
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,205

    Re: If Formula with 3 Logic didn't Work

    See post #13. I asked for expected results, not a repeat of the criteria.

    I'm expecting your help ma'am,
    Unfortunately you have wasted the best part of three hours with your unwillingness to provide simple sample data. I have now run out of time - sorry. Someone else will take it from here, but they will need the information I am asking for.
    Last edited by AliGW; 02-08-2022 at 07:42 AM. Reason: Language simplified for OP.

  16. #16
    Registered User
    Join Date
    02-07-2022
    Location
    Bekasi, Indonesia
    MS-Off Ver
    365
    Posts
    26
    Sorry i don't get what you asked. I'm not native in english so there's some expression that i don't understand.
    Last edited by AliGW; 02-08-2022 at 07:41 AM. Reason: PLEASE don't quote unnecessarily!

  17. #17
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,205

    Re: If Formula with 3 Logic didn't Work

    In post #13 I showed you what you have given us in your sample workbook. Do you see that?

    This is NOT what we want to see. In column Q you need to type MANUALLY (NO formula!) the results you are expecting.

    Do this now and attach the amended copy of your workbook to your next post.

    Your English is much better than my bahasa Indonesia.

    I hope you get this resolved. I have to go out now.

  18. #18
    Registered User
    Join Date
    02-07-2022
    Location
    Bekasi, Indonesia
    MS-Off Ver
    365
    Posts
    26
    I see. I expecting if i enter the value that matches with store on ODC on Stock Detail Q5, It will automatically turn Q7 below to the "OK", "CHECK" or "-" value.
    Last edited by AliGW; 02-08-2022 at 07:49 AM. Reason: PLEASE don't quote unnecessarily!

  19. #19
    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
    30,675

    Re: If Formula with 3 Logic didn't Work

    Try

    =IF(MATCH($Q$5,ODC!$B$1:$B$28,0),IF(AND(ISNUMBER(MATCH(F7,ODC!$C:$C,0)), --(ODC!$G$1:$G$28>0)),"YES","CHECK"),"-")

    NOTE: column C of ODC only contains "MENSPORT" (Sub-category) : there is no "Category" (PMSHOES)

    If BOTH are present the formula should be:

    =IF(MATCH($Q$5,ODC!$B$1:$B$28,0),IF(AND(ISNUMBER(MATCH(E7&F7,ODC!$C:$C,0)), --(ODC!$G$1:$G$28>0)),"YES","CHECK"),"-")

    and column C will be PMSHOESMENSPORT (no spaces or separator).
    Attached Files Attached Files

  20. #20
    Registered User
    Join Date
    02-07-2022
    Location
    Bekasi, Indonesia
    MS-Off Ver
    365
    Posts
    26

    Re: If Formula with 3 Logic didn't Work

    Quote Originally Posted by JohnTopley View Post
    Try

    =IF(MATCH($Q$5,ODC!$B$1:$B$28,0),IF(AND(ISNUMBER(MATCH(F7,ODC!$C:$C,0)), --(ODC!$G$1:$G$28>0)),"YES","CHECK"),"-")

    NOTE: column C of ODC only contains "MENSPORT" (Sub-category) : there is no "Category" (PMSHOES)

    If BOTH are present the formula should be:

    =IF(MATCH($Q$5,ODC!$B$1:$B$28,0),IF(AND(ISNUMBER(MATCH(E7&F7,ODC!$C:$C,0)), --(ODC!$G$1:$G$28>0)),"YES","CHECK"),"-")

    and column C will be PMSHOESMENSPORT (no spaces or separator).
    it doesn't work as i want,
    but i think i already knows what's the problem.
    the column G on ODC is not on the exact row as the store that inputted in Q5.

    i tried to change the third logic ODC!$G15>0 and the cells turn into "YES". so we need to put the third logic on the specified row that matches with the store on Q5
    Last edited by poncosh98; 02-08-2022 at 08:21 AM.

  21. #21
    Registered User
    Join Date
    02-07-2022
    Location
    Bekasi, Indonesia
    MS-Off Ver
    365
    Posts
    26

    Re: If Formula with 3 Logic didn't Work

    the closest logic that i get is

    =IF(MATCH($Q$5,ODC!$B$1:$B$28,0),IF(AND(ISNUMBER(MATCH(F8,ODC!$C:$C,0)),(VLOOKUP(Q5,ODC!C1:G28,3,0))>0,"YES","CHECK")),"-")

    but it won't work

  22. #22
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,205

    Re: If Formula with 3 Logic didn't Work

    1. Pleae stop quoting posts - it is not necessary and wastes space in your thread.
    2. For the LAST time, what are the RESULTS in cells Q5 to Q20 that you want to see? EXACT RESULTS, not an explanation of how they are to be worked out. At the moment column Q says CHECK in every cell - change the cells that should NOT be CHECK to the correct result and attach the workbook again.

    I really don't know how many more ways I can explain this to you. Anyway, really got to go now.

  23. #23
    Registered User
    Join Date
    02-07-2022
    Location
    Bekasi, Indonesia
    MS-Off Ver
    365
    Posts
    26

    Re: If Formula with 3 Logic didn't Work

    The sheets is all connected, i don't know how to make it more simple.

  24. #24
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,205

    Re: If Formula with 3 Logic didn't Work

    We do NOT need to see the results of a failing formula.

    Which of these cells should say "OK" and which should say "-"???

    AliGW on MS365 Insider (Windows) 64 bit

    Q
    5
    W10
    6
    ODC
    7
    CHECK
    8
    CHECK
    9
    CHECK
    10
    CHECK
    11
    CHECK
    12
    CHECK
    13
    CHECK
    14
    CHECK
    15
    CHECK
    16
    CHECK
    17
    CHECK
    18
    CHECK
    19
    CHECK
    20
    CHECK
    Sheet: Stock detail 07 Feb 2022

  25. #25
    Registered User
    Join Date
    02-07-2022
    Location
    Bekasi, Indonesia
    MS-Off Ver
    365
    Posts
    26

    Re: If Formula with 3 Logic didn't Work

    W19
    ODC
    CHECK
    CHECK
    CHECK
    CHECK
    CHECK
    CHECK

    for example if i put W19 on Q5, the ODC column should be all OK, because the ideal value of store W19 on ODC is higher than 0%, the category of MENSPORT is matches with ODC Category.

    and if i put W18 on Q5, the ODC column should be CHECK because the ideal value is below 0%

    there's no example for "-" because i already made the category to only MENSPORT

  26. #26
    Registered User
    Join Date
    02-07-2022
    Location
    Bekasi, Indonesia
    MS-Off Ver
    365
    Posts
    26

    Re: If Formula with 3 Logic didn't Work

    now i found the correct one
    =IF(MATCH($Q$5,ODC!$B$1:$B$28,0),IF(AND(ISNUMBER(MATCH(F7,ODC!$C:$C,0)),--(VLOOKUP($Q$5,ODC!$B$1:$G$28,6,0))>0),"YES","CHECK"),"-")

    thank you guys for replying

  27. #27
    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
    30,675

    Re: If Formula with 3 Logic didn't Work

    Please mark as SOLVED: See "Thread Tools" at top of thread.

  28. #28
    Registered User
    Join Date
    02-07-2022
    Location
    Bekasi, Indonesia
    MS-Off Ver
    365
    Posts
    26

    Re: If Formula with 3 Logic didn't Work

    Quote Originally Posted by JohnTopley View Post
    Please mark as SOLVED: See "Thread Tools" at top of thread.
    not solved yet sir

  29. #29
    Registered User
    Join Date
    02-07-2022
    Location
    Bekasi, Indonesia
    MS-Off Ver
    365
    Posts
    26

    Re: If Formula with 3 Logic didn't Work

    now the only problem is only on the column E7 and F7 if i want both of those are available to matches with ODC!C:C

    =IF(MATCH($Q$5,ODC!$B$1:$B$28,0),IF(AND(ISNUMBER(MATCH(OR(E7,F7),ODC!$C:$C,0)),--(VLOOKUP($Q$5,ODC!$B$1:$G$28,6,0))>0),"YES","CHECK"),"-")

  30. #30
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,205

    Re: If Formula with 3 Logic didn't Work

    there's no example for "-" because i already made the category to only MENSPORT
    For future reference: in a sample workbook you should include examples of ALL possible outcomes.

  31. #31
    Registered User
    Join Date
    02-07-2022
    Location
    Bekasi, Indonesia
    MS-Off Ver
    365
    Posts
    26

    Re: If Formula with 3 Logic didn't Work

    This is the example of it.

    PMBAGS is on column E, so it can't be matches with the current formula with ODC!C:C
    FLEXIBLEPLASTIC is not on sale, so it won't be found on ODC category (ODC!C:C)
    Attached Files Attached Files

  32. #32
    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
    30,675

    Re: If Formula with 3 Logic didn't Work

    This will not work....

    MATCH(OR(E22,F22),'C:C,0)

    try this ...

    OR(MATCHE22,'C:C,0),MATCH(F22,'C:C,0)),

  33. #33
    Registered User
    Join Date
    02-07-2022
    Location
    Bekasi, Indonesia
    MS-Off Ver
    365
    Posts
    26

    Re: If Formula with 3 Logic didn't Work

    =IF(OR(IFNA(ISNUMBER(MATCH(E7,ODC!$C:$C,0)),"1"),IFNA(ISNUMBER(MATCH(F7,ODC!$C:$C,0)),"1")),IF(OR(IF((AND(ISNUMBER(MATCH($Q$5,ODC!$B$1:$B$271,0)),--IF(IFNA((VLOOKUP($Q$5&E7,ODC!$G$1:$H$271,2,0))>0%,FALSE),1,0))),1,0),IF((AND(ISNUMBER(MATCH($Q$5,ODC!$B$1:$B$271,0)),--IF(IFNA((VLOOKUP($Q$5&F7,ODC!$G$1:$H$271,2,0))>0%,FALSE),1,0))),1,0)),"OK","CHECK"),"-")

    got it. thanks for all the help

  34. #34
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,205

    Re: If Formula with 3 Logic didn't Work

    If you have not already done so, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.

+ 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. Replies: 6
    Last Post: 10-30-2017, 05:55 AM
  2. [SOLVED] Sequential PO# didn't work
    By KG869 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-25-2015, 05:08 PM
  3. [SOLVED] Simple Formula, cant get logic to work
    By cdotyii in forum Excel General
    Replies: 3
    Last Post: 07-31-2015, 09:32 AM
  4. my vba cursor didn't work...any help pls...
    By reignkystar in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-17-2013, 01:50 AM
  5. Need help on Logic to make formula work correctly
    By cdotyii in forum Excel General
    Replies: 1
    Last Post: 06-06-2012, 08:23 AM
  6. [SOLVED] Didn't work ( moving formula/cell )
    By Brenda in forum Excel General
    Replies: 7
    Last Post: 11-20-2005, 06:35 PM
  7. [SOLVED] Suggested answers didn't work
    By scratching my head in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-01-2005, 05:05 AM

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