+ Reply to Thread
Results 1 to 4 of 4

What is the difference between + and "OR" in an array formula??

  1. #1
    Registered User
    Join Date
    05-21-2012
    Location
    Toronto
    MS-Off Ver
    Excel 2003 & 2010
    Posts
    14

    What is the difference between + and "OR" in an array formula??

    If I want to write in excel: Check all the cells in Column L if ="Toronto or "Vancouver" then check the corresponding cell in column B and if its less than 1 million and great or equal to 600k "yes" false "No"

    =MAX(IF(OR(('large loans'!$L$6:$L$17="Toronto"),('large loans'!L6:L17="Vancouver")),'large loans'!B6:B17,))
    is there a difference

    =MAX(IF(('large loans'!L7:L18="Toronto")+('large loans'!L7:L18="Vancouver"))'large loans'!B7:B17,))

    Why am I getting different outputs? and they are not the right outputs?

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: What is the difference between + and "OR" in an array formula??

    OR doesn't work with arrays because it returns a single value, not an array, try tweaking your other formula like this

    =MAX(IF(('large loans'!L7:L18="Toronto")+('large loans'!L7:L18="Vancouver"),'large loans'!B7:B18))

    confirm with CTRL+SHIFT+ENTER

    That gives the maximum value in column B where one or either condition is met in column L....is that what you need, your description indicates something else?
    Audere est facere

  3. #3
    Forum Contributor
    Join Date
    02-07-2012
    Location
    MIA
    MS-Off Ver
    Excel 2007, 2010
    Posts
    429

    Re: What is the difference between + and "OR" in an array formula??

    You might be getting different outputs because you don't have the same ranges selected...

    =MAX(IF(OR(('large loans'!$L$6:$L$17="Toronto"),('large loans'!L6:L17="Vancouver")),'large loans'!B6:B17,))
    =MAX(IF(('large loans'!L7:L18="Toronto")+('large loans'!L7:L18="Vancouver"))'large loans'!B7:B17,))
    Im not saying that this is what's going on, but if you want to compare the results from two formulas at least apply them to the same range... Try changing the second one to this:

    Please Login or Register  to view this content.
    and then compare the results. You can't compare inconsistent formulas.
    .?*??)
    `?.???.?*??)?.?*?)
    (?.?? (?.?
    Pichingualas <---
    ??????????????????????????

    Wrap your code with CODE TAGS.
    Thank those who helped you, Don't forget to add to their REPUTATION!!! (click on the star below their post).
    Please mark your threads as [SOLVED] when they are (Thread Tools->Mark thread as Solved).

  4. #4
    Registered User
    Join Date
    05-21-2012
    Location
    Toronto
    MS-Off Ver
    Excel 2003 & 2010
    Posts
    14

    Re: What is the difference between + and "OR" in an array formula??

    THANKs so much ya I didn't know that OR did not work on arrays!



    If I want to know the max in column B for EVERYTHING except the above listed palces "Unionville" "Oakville", "Thornhill" "Toronto" etc. in column L how would I go about doing that?

    Thanks so much!
    Last edited by MIAO; 05-21-2012 at 04:52 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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