Output to worksheet cells - known amount of data


Your program needs to output data to the user. You know exactly how many elements you want to display, and what type they are. The tip program is an example.


Choose a few cells on a worksheet. Output data to those cells with the Cells method.


The output goes into cells in the worksheet. Use Cells to put data in a cell. For example:

  1. Dim tip As Single
  2. ...
  3. Cells(2, 2) = tip
The first parameter to Cells is the row. The second is the column.

You should label the cells so that the user knows what the values mean. Like this:


There are labels for tip and total.

Referenced in: