total += row.Cells(amount).Value
correct this line
if your column name is 'amount' then you should write it in double quotes
total += row.Cells("amount").Value
or you can access column 'amount' by number start counting columns from 0 to onwards
eg.
ColumnName
name address amount
ColumnIndex
0 1 2
here, for 'amount' columnName, column-index is 2
so, we can write it as below
total += row.Cells(2).Value
Happy Coding!
:)