27 | 07 | 2017

Add data to cells

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

Sub FillCells()

'****************************************
'*** Code from VisibleVisual.com ********
'****************************************
 
'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

 

 

Login

Sign up now and upload your code to the website.

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