Index was outside the bound of the array in Excel Loop


I am facing the attached issue while using excel loop. What could be the reason of this?


When are you observing this error.

  1. At the start of loop.
  2. For some specific row
    All row have been processed and then you are getting this error

Hi Amit,

I am using excel loop inside while loop. I am trying to execute that while loop till the length of array-1. For 1st value of Array (arr(0)), it is giving output but while executing next iteration that is for 2nd iteration, am facing this issue.