+ Reply to Thread
Results 1 to 13 of 13

Why an "IF-AND" formula does not gives logical result in a matrix?

  1. #1
    Registered User
    Join Date
    08-14-2013
    Location
    Pakistan
    MS-Off Ver
    Excel 2016
    Posts
    32

    Why an "IF-AND" formula does not gives logical result in a matrix?

    Hi,
    I'm confused by the fact that an "IF-AND" formula meets logical conditions and produces logical results in certain cells of the matrix while it does not do so in certain other cells.

    The example is attached and problemetic cells are highlighted. Can anybody help see what I'm doing wrong?

    Best regards
    Attached Files Attached Files

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Why an "IF-AND" formula does not gives logical result in a matrix?

    There is an extra space in G2 Cell data. If you correct it then your formula will show the result.

    An alternative approach...

    In C12 Cell - Array Formula - Requires CTRL+SHIFT+ENTER
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Drag it down and right...

    Array formulas need to be entered using the key combination of CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT key then hit ENTER.


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    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,938

    Re: Why an "IF-AND" formula does not gives logical result in a matrix?

    Hi and welcome to the forum

    I have not yet checked your logic, but I did see that some of your data has trailing spaces? Check these and see if that fixes your problem?
    For instance, compare sheet2 F2 and G2 (there are a few others)
    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

  4. #4
    Registered User
    Join Date
    08-14-2013
    Location
    Pakistan
    MS-Off Ver
    Excel 2016
    Posts
    32

    Re: Why an "IF-AND" formula does not gives logical result in a matrix?

    Hi @ Sixthsense
    Your array formula is more elegant and effective than I was using.

    Thanks a lot for spotting the problem and the bonus solution .
    Last edited by guest2013; 08-19-2013 at 01:40 AM.

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

    Re: Why an "IF-AND" formula does not gives logical result in a matrix?

    you'r welcome. If this answered your question, please take a moment to mark the thread as "solved" - it helps keep things neat and tidy lol, and consider adding the reputation to those that helped (see points 2 & 3 below)

  6. #6
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Why an "IF-AND" formula does not gives logical result in a matrix?

    Glad it helps you and thanks for the feedback

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  7. #7
    Registered User
    Join Date
    07-16-2013
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007
    Posts
    34

    Re: Why an "IF-AND" formula does not gives logical result in a matrix?

    TRY THIS ONE ALSO
    =IFERROR(LOOKUP(1,1/((Sheet1!$B$3:$B$10=$B3)*(Sheet1!$C$3:$C$10=C$2)),Sheet1!$D$3:$D$10),0)
    this is not array formula

  8. #8
    Registered User
    Join Date
    08-14-2013
    Location
    Pakistan
    MS-Off Ver
    Excel 2016
    Posts
    32

    Re: Why an "IF-AND" formula does not gives logical result in a matrix?

    Thanks @ashishraj. Your solution is also nice.

  9. #9
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Why an "IF-AND" formula does not gives logical result in a matrix?

    Hi,

    Are you sure the answers you've been given give you what you expect. The sum of the numbers in the matrix are different to the sum of your original list. i.e.

    original list 0.124
    Ashishraj & sixth sense 0.304

    Specifically, in the results matrix there are the same count of .017 (2) but an extra 8 of .009 and and an extra 4 of .027.

    I only ask since your other thread seemed to imply there should be the same count of the numbers albeit in a different layout.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  10. #10
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Why an "IF-AND" formula does not gives logical result in a matrix?

    @ Richard,

    I am unable to follow you please correct me where I am getting failed....

  11. #11
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Why an "IF-AND" formula does not gives logical result in a matrix?

    @sixthsense.

    I think you misunderstand.

    I'm not saying you've failed since at the moment it's not entirely clear to me from this and a similar post from guest2013 yesterday, exactly what results he's expecting. That's why I wrote, "Are you sure the answers you've been given give you what you expect".

    I'm simply questioning whether the output should contain as many values as there are in the original layout, albeit in a different matrix layout. If not then the answers you've both given are presumably correct as guest 2013 has closed the thread.

    Regards

  12. #12
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Why an "IF-AND" formula does not gives logical result in a matrix?

    @ Richard,

    Ah! Yes I was little confused that your clarification post was addressed to us (to the Answerers) and now it's clear and thanks for your input

  13. #13
    Registered User
    Join Date
    08-14-2013
    Location
    Pakistan
    MS-Off Ver
    Excel 2016
    Posts
    32

    Re: Why an "IF-AND" formula does not gives logical result in a matrix?

    Quote Originally Posted by Richard Buttrey View Post
    Hi,

    Are you sure the answers you've been given give you what you expect. The sum of the numbers in the matrix are different to the sum of your original list. i.e.

    original list 0.124
    Ashishraj & sixth sense 0.304

    Specifically, in the results matrix there are the same count of .017 (2) but an extra 8 of .009 and and an extra 4 of .027.

    I only ask since your other thread seemed to imply there should be the same count of the numbers albeit in a different layout.
    Hi Richard,
    In fact, all of you have given what I needed and I'm grateful for the help.

    Using Ashishraj's formula (I think sixthsense's would do the same) on an edgelist of more than 500 edges, I produced a matrix and then using your proposed method of the other post a matrix of order 153*153 resulted. This is what I needed. A simple test of a random row-column match is attached.

    Thanks again for the help.

    Cheers,
    Guest2013
    Attached Files Attached Files

+ 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. [SOLVED] IF formula with logical " Less than Or Equal To" NOT WORKING (Data is week number)
    By zeko90 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-28-2013, 02:51 PM
  2. Why is my Formula result = "True" rather than "False"
    By Mike Burns in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-05-2012, 10:14 AM
  3. [SOLVED] Find multiple "text" criteria and return as ""Yes" in Matrix
    By bertrand82 in forum Excel General
    Replies: 11
    Last Post: 04-30-2012, 09:20 AM
  4. Replies: 5
    Last Post: 10-12-2010, 06:46 AM
  5. ABCD matrix. Need formula for if A1 = "x" then "A"
    By uropachild in forum Excel General
    Replies: 4
    Last Post: 11-11-2009, 09:10 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