Hi orlando,
I'm not sure if you are referring to a range which you have named in the
interactive mode or a range to which you have assigned to a variable in VBA.
I suggest that you copy the following code into a blank workbook and check
out what it all does.
Macro1 starts with recorded code of naming a range while working on the
worksheet. The Named range could have been created previously but I have put
it in the macro so that you have the range named properly for the following
code.
Run the macros in order by number.
Macro2 then puts some data in the cells in the named range. Note that the
named range is like a mini worksheet within a worksheet and the cells start
on row1, column 1 of the named range. When using the cells function, note
that the row number is first and the column number second. Cells(RowNumber,
ColumnNumber).
This is opposite to range("A1") where column number is first.
Comments in the other macros say what they do.
I have included code which inserts data, reads data and loops through all
the cells in the range.
Macro5: Lastly, I have included code to assign a range to a VBA variable and
then loop through the cells and write data to them.
Hope this helps and feel free to get back to me if you have any more
questions.
Regards,
OssieMac