+ Reply to Thread
Results 1 to 4 of 4

Curly brackets / arrays in if statement formulas

  1. #1
    Registered User
    Join Date
    10-07-2014
    Location
    Denmark
    MS-Off Ver
    2013
    Posts
    2

    Curly brackets / arrays in if statement formulas

    Hello

    I wonder if anyone can answer me why the below formula insist in ending in a false statement. I probably have misunderstood something with using arrays in formula. I thought a IF(z+y={x,a,u}) would provide a true statement if one of the values in the array is met but apperantly this isn't the case?

    I noticed if the first number/value in the brackets is true then the formula will provide a true steatement, but why?

    Example.png

  2. #2
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Curly brackets / arrays in if statement formulas

    Your formula returns an array of True/False results, not a single result if any match is made. You would need something like an OR, MATCH or SUMPRODUCT function if you want one result of True if any of them match.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: Curly brackets / arrays in if statement formulas

    Your explanation would have been easier to follow if you had attached a sheet, so that we can see exactly what was there. however, I'd probably use something like this:

    =IF(ISNUMBER(MATCH(A1,$C$1:$C$5,0)),TRUE,FALSE)

    see sheet
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  4. #4
    Registered User
    Join Date
    10-07-2014
    Location
    Denmark
    MS-Off Ver
    2013
    Posts
    2

    Re: Curly brackets / arrays in if statement formulas

    Thanks. I used the Isnumber() statement instead. What I was trying to do was to pull a specific part of a string based on the last character of a left() statetement. Lucky for me, the characters are all numbers so this works fine.

    Sorry I would have thought the attached picture gave a pretty good indication of what I meant.

    It's just strange because I see examples on the web, where arrays are used in IF statements with multiple criteria and seem to work in some cases. Also I find it strange that the formula returns a "True" if the first value in the array is a met but returns a "False" for all other following values.
    Last edited by Mahisse; 06-18-2018 at 09:20 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. [SOLVED] How to enter array formula with curly brackets into cell
    By Imbizile in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-30-2017, 09:55 AM
  2. Sum and Countif Formulae with curly brackets to find a percentage
    By deborahlane in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 07-13-2015, 04:41 PM
  3. [SOLVED] SUM(COUNTIF.. with more than one pair of curly brackets ?
    By Gabor in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 12-30-2013, 03:46 PM
  4. what is the meaning of curly brackets in the functions { }
    By funtastic in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-04-2013, 04:23 PM
  5. What do curly brackets /braces {} do in VBA
    By Huugin in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-17-2012, 04:33 PM
  6. [SOLVED] Excluding Single Member from CUBEVALUE using Curly Brackets
    By tlafferty in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-21-2012, 05:58 PM
  7. [SOLVED] Curly Brackets in formula view
    By VBSK8R in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-04-2012, 09:32 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