• 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

AliGW

Active Member
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.
 

Peter Bartholomew

Well-Known Member
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.
 

Peter Bartholomew

Well-Known Member
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

herclau

Member
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

Top