• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

The Index function (Table3,0,3) returns a value !!! Was an error expected?

herclau

Member
I do not understand the behavior of the Index function, in this case I show. The solution I found is shown in the accompanying column.
How is it that Index (Table3,0,3) Row = 0? return a value; an error was expected !!!
Why this behavior? Could you explain to me, please!
That would be the right thing to avoid this error

62195
 

Attachments

  • Error with index Function.xlsx
    21 KB · Views: 7
What exactly are you expecting this bit of the formula to do?

=IF(MOD(@Vseq-1,repeat)=0,0,INT((@Vseq-1)/repeat)+1)

It's not returning a row number, is it? Try it on its own in another column.
 
herclau
If You could solve that like this?
... without any index-formulas, which always works correct way.
 

Attachments

  • Error with index Function.xlsx
    20.9 KB · Views: 6
The index function expects positive integers for the row and column indices. However 0 or blank is also valid, in which case INDEX returns an entire row or column as a range reference. What happens next depends on whether the formula is an array formula or not but you cannot assume it will return an error.
 
The chart in the attached file also contains a normal probability density distribution.
Down amongst the formulas, I have changed the logic to prevent the formula trying to lookup a zero value. That would avoid your error with INDEX but also works when using LOOKUP, as here. The reason for the change to LOOKUP was because that function behaves better than INDEX when an array of results is needed.
 

Attachments

  • Histogram(PB).xlsx
    19.2 KB · Views: 9
The chart in the attached file also contains a normal probability density distribution.
Down amongst the formulas, I have changed the logic to prevent the formula trying to lookup a zero value. That would avoid your error with INDEX but also works when using LOOKUP, as here. The reason for the change to LOOKUP was because that function behaves better than INDEX when an array of results is needed.
Hi Peter Bartholomew:
Following the methodology shown in the previous file.
Will it be possible to enter the values of the column res in a variable, "Y".?
62396
 

Attachments

  • VariableY.xlsx
    10.3 KB · Views: 0
Back
Top