VBA: Read value from cell - how it works
With VBA you can read the value from a cell in Excel, even without being a real programming professional. We show you which command you have to enter.
Read out value from cell with VBA - how it works
For a better understanding, we give you a command line as an example. With the explanations, you can easily rewrite the command on your Excel sheet.
- The command to read out the value of a cell is, for example, "Value = Worksheets (" Sheet1 "). Cells (25, 8) .Value".
- "Sheet1" denotes the name of the relevant sheet. Modify this part according to your Excel folder.
- There are two values in brackets behind "Cells". The first denotes the row in which the cell is located, the second value denotes the column. The column is not specified as a letter, as in the Excel sheet, but is defined numerically. In our example, this means that the value should be read from the cell in row 25 in the eighth column. The eighth column corresponds to column "H".
In the next practical tip, you will read how to create a table of contents for Excel spreadsheets.