how loop over a range in Excel VBA
Posted on 2013-12-31
Hello I need to create a function in Excel using VBA.
I need to pass a range to loop it and perform some calculations.
The idea is use a for next bucle to read all the rows, and analice the diferente columns in it.
The problem is that I don't know how to reference the cells to read it.
At the moment I have this...
Function rangeAnalizer(num As Integer, fecha As Date, rango As Range)
Dim intNumFilas As Integer
Dim intNumColumnas As Integer
Dim celda As Range.Cells
intNumFilas = rango.Rows.Count
intNumColumnas = rango.Columns.Count
Dim prueba As Integer
prueba = celda(1, 1).Item ?????