+ Reply to Thread
Results 1 to 4 of 4

Need help with logical calculation

  1. #1
    Registered User
    Join Date
    12-18-2015
    Location
    Home
    MS-Off Ver
    2013
    Posts
    1

    Need help with logical calculation

    Test 1.xlsx

    Hello.
    In the above attachment, I have Column A,B and C.
    Column D is the result that I would like to obtain.

    For a given Return Ord number, if there are 1's on both columns B and D, I would like a 1 on Column D for a unique Return Ord Num.
    Similarly, for a given Return Ord number, if there are 0's on both columns B and D, I would like a 0 on Column D for a unique Return Ord Num.

    Much appreciate!

  2. #2
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Need help with logical calculation

    Give this one a try

    =--(COUNTIFS(A:A,A2,B:B,0,C:C,0)=0)

    edit:- because you have merged cells of different sizes you will not be able to copy the formula down without unmerging them first.

    If the file that Imran has attached to post #3 is acceptable then either the formula used there, or the one I have provided here will work (see my comments to Imran in post 4 before deciding).

    If you need it so that it only shows 1 result for each change of entry in column A, then try this one instead. Please note that if your table is not sorted by column A then you will get 1 result each time the entry in column A differs from the 1 above it regardless of whether or not that entry has appeared previously in the list.

    =IF(A2=A1,"",--(COUNTIFS(A:A,A2,B:B,0,C:C,0)=0))

    For 1 result per unique entry in column A with unsorted data, try

    =IF(MATCH(A2,A:A,0)=ROW(),--(COUNTIFS(A:A,A2,B:B,0,C:C,0)=0),"")
    Last edited by jason.b75; 12-19-2015 at 06:15 AM.

  3. #3
    Registered User
    Join Date
    12-07-2015
    Location
    delhi
    MS-Off Ver
    2010
    Posts
    80

    Re: Need help with logical calculation

    Hi,

    PFA excel file.

    regards Imran.
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Need help with logical calculation

    @Imran,

    Your method is just a longer version of what I have suggested. When the desired result is either 1 for true or 0 for false you can omit the use of 'IF' by 1 of many simple methods.

    =--(logical test)
    =(logical test)+0
    =(logical test)*1

    Gives just 3 examples, there are other variations as well.

    In addition, check the results of your formula, using =IF(logical test,"1","0") is bad practice, you should use =IF(logical test,1,0) instead (i.e. no "" when the return values are numeric).

    To understand why, check the result of =SUM(D2:D25) using both methods.

+ 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: 7
    Last Post: 01-07-2015, 06:29 AM
  2. Time Calculation using Logical function
    By L Raju in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-16-2014, 04:00 AM
  3. logical and time calculation problem
    By wba in forum Excel General
    Replies: 4
    Last Post: 07-01-2012, 07:05 AM
  4. Logical calculation of fees and currencies
    By bakuvi in forum Excel General
    Replies: 4
    Last Post: 11-17-2009, 05:06 PM
  5. [SOLVED] Using Logical Function in Pivot Calculation
    By Mike G in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-03-2006, 12:10 PM
  6. [SOLVED] numeric calculation in logical formula
    By Chris Vermaak in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-25-2005, 07:05 AM
  7. [SOLVED] pivot table logical calculation
    By Spencer Hutton in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-08-2005, 03:06 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