Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Lorenzo Lee   on Nov 26 In MS Office Category.

  
Question Answered By: Caitlin Brown   on Nov 26

How about this,

Dim dblSum As Double
' Sum column  A of Sheet1 in thisworkbook
dblSum =
Application.WorksheetFunction.Sum(ThisWorkbook.Worksheets("Sheet1").Columns(1))

I think the Mismatch error  is caused by a cell containing text instead
of a number.

Also your original  code loops across the columns in row 1
.cells(1, i)
whereas the question  suggests you want to move down the rows in a column.

Share: 

 

This Question has 7 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on count the sum of a column Or get search suggestion and latest updates.


Tagged: