+ Reply to Thread
Results 1 to 9 of 9

Adding another If Statement to an array formula

  1. #1
    Registered User
    Join Date
    02-04-2015
    Location
    Northern Kentucky
    MS-Off Ver
    2013
    Posts
    5

    Adding another If Statement to an array formula

    I am very new with array formulas and can normally work my way through adding additional criteria to regular formulas but this one is giving me trouble...

    This is my current formula that works as is:
    =IFERROR(INDEX(EVENTS!$B$9:$F$293,SMALL(IF(Dates=O$6,ROW(Dates)),ROW(2:2))-TableRowStart,3),"")

    I would REALLY like to be able to tell it to only bring back the items that are visible from the table. With that in mind, I have added a column in my table labeled "Visible" and have it bringing back a value of 1 if the row is visible and a 0 if it is hidden. Is there any easy answer as to how to properly nest this in?

    I appreciate all help!

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Adding another If Statement to an array formula

    Like this...

    =IFERROR(INDEX(EVENTS!$B$9:$F$293,SMALL(IF((Visible=1)*(Dates=O$6),ROW(Dates)),ROW(2:2))-TableRowStart,3),"")

    Still array entered.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Registered User
    Join Date
    02-04-2015
    Location
    Northern Kentucky
    MS-Off Ver
    2013
    Posts
    5

    Re: Adding another If Statement to an array formula

    Hmm. That didn't make the data show up. Why do you use the *?

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,152

    Re: Adding another If Statement to an array formula

    The "*" is the "AND" condition. An OR condition uses "+".

    Post a small file (not image) if you are still having problems.

    To upload a file click "Go Advanced" then scroll down to "Manage Attachments"

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Adding another If Statement to an array formula

    Quote Originally Posted by SJohnsonbaugh View Post
    Why do you use the *?
    It's using array multiplication...

    (Visible=1)*(Dates=O$6)

    In "plain English" it means If (Visible range =1) AND (Dates range = O6).

    Post a SMALL sample file so we can see your data. 20 rows worth of data is plenty.

    We don't need or want to sift through 100's or 1000's of rows worth of data to find what we're looking for. That just makes it harder!

  6. #6
    Registered User
    Join Date
    02-04-2015
    Location
    Northern Kentucky
    MS-Off Ver
    2013
    Posts
    5

    Re: Adding another If Statement to an array formula

    I believe I Have attached the document.

    I have a list of data on "events" tab. They cover different months.

    When I select the slicer for any one of those months and then go to the "calendar" tab, I only want the Visible cells from the events tab to show up on the calendar. So, on the attached I have December open. If I chose the slicer for Dec, then on November 30th (visible on December calendar) it should not show up the "Onsite Interim Testing".

    I have two cells on the calendar that are a different color, which are the ones I was changing the formula on to test. One is on November 30, one is on December 1. The rest of the dates on the calendar have not been adjusted at all and show everything that is listed (visible or not) on the Events tab.

    Thank you!
    Attached Files Attached Files

  7. #7
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,152

    Re: Adding another If Statement to an array formula

    Define "Visible" as Named range.

  8. #8
    Registered User
    Join Date
    02-04-2015
    Location
    Northern Kentucky
    MS-Off Ver
    2013
    Posts
    5

    Re: Adding another If Statement to an array formula

    Perfect! I wondered if that was an issue when it didn't show up as auto-populated, but wasn't sure how to fix it. THANK YOU!

  9. #9
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Adding another If Statement to an array formula

    Good deal. Thanks for the feedback!

+ 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 Statement Array Formula
    By mphillips in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-09-2015, 12:34 PM
  2. Adding an OR statement into formula
    By mack_76 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 01-21-2015, 11:43 AM
  3. [SOLVED] Possible if statement and array formula
    By mcranda in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 01-28-2013, 06:34 PM
  4. [SOLVED] SUM, IF and AND Statement in array formula
    By Debbie Thomson in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-08-2013, 11:21 PM
  5. Adding an IF statement to a SUMPRODUCT Array
    By kgibson20 in forum Excel General
    Replies: 4
    Last Post: 01-03-2011, 01:23 PM
  6. Adding Another IF statement to a Formula
    By robertguy in forum Excel General
    Replies: 2
    Last Post: 08-16-2010, 11:50 AM
  7. Adding an OR statement into formula
    By dvent in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-11-2008, 08:39 AM

Tags for this Thread

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