
4.REFERENCING THE DATABASE USER CUSTOMIZE B-75074EN/04
- 442 -
4.2.2 Displaying Acquired Data
This subsection describes the method of displaying acquired data on an
Excel sheet.
Use the Range property or the Cells property to display acquired data in
a cell.
Setting numeric values in cells
1 When the Range property is used
When using the Range property, use the format "Range("matrix")"
like "Range("A2")". Represent a column by using a letter like "A".
A numeric value can be set in one cell as follows:
Range(“A1”).Value = 1 ‘Basic type
Range(“A2”) = 2 ‘Abbreviated type
[A3] = 3 ‘Abbreviated type
Numeric values can be set in multiple cells (A1, A2, A3, A4, A5)
at a time as follows:
Range(“A1:A5”).Value = 1
The numeric value set in a variable can be set as follows:
Dim X As Long
X = 10
Range(“A1”).Value = X
2 When the Cells property is used
When using the Cells property, use the format "Cells (row,
column)" like "Cells (2, 1)". Represent a column by using a
numeric value like "1".
The Cells property allows a numeric variable to be used as an
argument.