20 | 09 | 2017

Add data to cells

There are multiple ways to add data to worksheets cells. Below we show you a few examples.

Sub FillCells()

'Add data right by using a cellname for instance cell A1
ActiveSheet.Range("A1") = "Cell A1"
'Alternative is to use the cells coordinate Cell(row, column)
ActiveSheet.Cells(3, 4) = "Cell D3" ' Cell(row, column)
'To add data to a multiple collection of cells use
ActiveSheet.Range("C4:C8") = "Cell C4 - C8 "
'or use
ActiveSheet.Range("E9, E11, E13") = "Cells E9, E11, E13 "
End Sub


Download project here




Sign up now and upload your code to the website.

Help us to continue.....
Articles View Hits
Latest Articles