+ Reply to Thread
Results 1 to 6 of 6

Can someone explain why INDEX is necessary here?

  1. #1
    Forum Contributor
    Join Date
    06-12-2020
    Location
    USA
    MS-Off Ver
    2013
    Posts
    132

    Can someone explain why INDEX is necessary here?

    I created this formula where I wanted to know if all the conditions were true or false. The only way I could get this to work was to put the array inside an INDEX function. Some functions will work without INDEX, but ISNUMBER will not. What is INDEX doing that allows this to work? Is there a way I can eliminate the INDEX function? Formula below

    =SUMPRODUCT(--AND(INDEX((""=$X$16:$X20)*ISNUMBER($Z$16:$Z20),)))

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,813

    Re: Can someone explain why INDEX is necessary here?

    Try it like this:

    =SUMPRODUCT(($X$16:$X20="")*(ISNUMBER($Z$16:$Z20)))

    Hope this helps.

    Pete

  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,139

    Re: Can someone explain why INDEX is necessary here?

    Oooh... it looks REALLY odd that way round!!

    =SUMPRODUCT(--AND(INDEX(($X$16:$X20="")*ISNUMBER($Z$16:$Z20),)))

    is more conventional. anyway. INDEX is adding the bits in red. Yes, you can take it out, but you may have to enter it as an array formula to get it to work. Thats why it's there. IMHO... leave it there.
    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

  4. #4
    Forum Contributor
    Join Date
    06-12-2020
    Location
    USA
    MS-Off Ver
    2013
    Posts
    132

    Re: Can someone explain why INDEX is necessary here?

    I'm not sure why I had the formula arranged in that order. Of course now I can't find the spreadsheet that I used this for. I keep a spreadsheet of formulas I figure out in case I ever have to use them again. That's where this came from.

    @Pete_UK I don't think your formula will give me a FALSE if all the operations don't evaluate to TRUE. For example, if after all the calculations I get an array of answers like this {0,1,0,0,1,0}. I want to get a FALSE which is why I'm using the 'AND' function. I could be wrong because like I said I can't find the spreadsheet I was trying to use this on. But what I still don't get is using the same formula (without the INDEX part) works with some functions but with a function like 'ISNUMBER' it doesn't work and I have to put it in.

  5. #5
    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,139

    Re: Can someone explain why INDEX is necessary here?

    ... because it's an array formula under those crcumstances and needs to be set with CTRL-SHIFT-ENTER and not just ENTER

  6. #6
    Forum Contributor
    Join Date
    06-12-2020
    Location
    USA
    MS-Off Ver
    2013
    Posts
    132

    Re: Can someone explain why INDEX is necessary here?

    Quote Originally Posted by Glenn Kennedy View Post
    ... because it's an array formula under those crcumstances and needs to be set with CTRL-SHIFT-ENTER and not just ENTER
    And so ISNUMBER is one of those functions that fails with arrays?

+ 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] Explain me is different as value and application.index
    By daboho in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 02-04-2018, 08:54 AM
  2. Explain Syntax [of INDEX with Evaluate]
    By sohaila in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 10-30-2017, 11:13 AM
  3. Replies: 3
    Last Post: 04-04-2017, 04:52 PM
  4. [SOLVED] Please Explain this Weird INDEX-MATCH Formula
    By omaral in forum Excel General
    Replies: 3
    Last Post: 01-12-2015, 07:56 PM
  5. [SOLVED] Explain Index Match formula
    By ddub25 in forum Excel General
    Replies: 13
    Last Post: 06-21-2012, 04:32 AM
  6. Explain index sumif formula
    By shopgirl1977 in forum Excel General
    Replies: 9
    Last Post: 12-17-2009, 12:14 PM
  7. Let me see if I can explain this...
    By jsc3489 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 11:05 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