Private Sub Command1_Click() 'suppose your datagrid have two columns,and the first column is numbers .
Dim sum As Long
sum = 0
For i = 0 To 4
DataGrid1.Row = i
DataGrid1.Col = 0
sum = sum + CLng(DataGrid1.Text) 'get sum of col(1)
Next
DataGrid1.Row = 0
DataGrid1.Col = 1
DataGrid1.Text = "the sum of col 1 is " & sum 'send text to (0,1)
End Sub