+ Reply to Thread
Results 1 to 6 of 6

Using the OR function with an array constant

  1. #1
    Registered User
    Join Date
    05-14-2013
    Location
    Hopewell Junction,NY
    MS-Off Ver
    Excel 2010
    Posts
    4

    Using the OR function with an array constant

    I want to be able to determine if a certain chosen date, in some cell, is among the serial numbers included within an array constant).
    For example, ={41640,41659,41687,41749,41785,41824,41883,41925,41954,41970,41971,41998} are the serial numbers of holidays for 2014.
    If there is a date serial number in cell A4, I want to be able to have it compared to all the numbers, in the array. If it exists, in the array, I want to be informed.
    I have been trying to do this using the OR function, but I have been unsuccessful at creating the formula which works. Additionally, I will be combining the result of this first step, with the IF function, to perform another step. I will appreciate any thoughts towards this goal.

  2. #2
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,366

    Re: Using the OR function with an array constant

    perhaps match and if and isna

    =if(isna(MATCH(A1,{41640,41659,41687,41749,41785,41824,41883,41925,41954,41970,41971,41998},0)),"not available","available")
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

  3. #3
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Using the OR function with an array constant

    It seems that something like this would work:
    Please Login or Register  to view this content.
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  4. #4
    Forum Expert boopathiraja's Avatar
    Join Date
    07-12-2013
    Location
    Coimbatore,TamilNadu, India
    MS-Off Ver
    Excel 2007, 2013, 2016, 365
    Posts
    1,455

    Re: Using the OR function with an array constant

    Hi, this will return 1 or 0

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Click just below left if it helps, Boo?ath?

  5. #5
    Registered User
    Join Date
    05-14-2013
    Location
    Hopewell Junction,NY
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Using the OR function with an array constant

    Thank you very much, I will have great use for this.

  6. #6
    Registered User
    Join Date
    05-14-2013
    Location
    Hopewell Junction,NY
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Using the OR function with an array constant

    Thank you so much, I am now using this. Even though I did not ask, but I discovered this array constant cannot be used in a formula (which equates to TRUE) in the conditional format feature. I had to write it differently to get it to work. =OR(A1=41640,A1=41659,etc). I am using the array constant within an IF function, to test for holidays, it works like a charm.

+ 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. Constant Array
    By ffffloyd in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 03-08-2010, 04:36 AM
  2. Constant Array?
    By Pherion in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-27-2009, 05:47 PM
  3. User Defined Function: multiply array by a constant
    By laterdaysluke in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-24-2008, 06:06 PM
  4. Build an array constant with DATE function
    By CliffD in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-11-2006, 09:55 AM
  5. A constant array?
    By Thief_ in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-21-2005, 06:06 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