Mega Code Archive

 
Categories / VisualBasic Script / Excel
 

Entering a value in the next empty cell

Sub GetData()   Do     NextRow = Application.WorksheetFunction.CountA(Range("A:A")) + 1     Entry1 = "A"     Entry2 = "B"     Cells(NextRow, 1) = Entry1     Cells(NextRow, 2) = Entry2   Loop End Sub