I have already found the row index of a cell using VBA code. But I now I need to find an average of values in the cells from an index to another index. To find average, I know i can use application.worksheetfunction.average() but how do I combine the column and row index. The row index is a variable while the column is B for example.
For example, I need to find the average between startIndex to endIndex
Code:application.worksheetfunction.average("BstartIndex:BendIndex").
Is this right?