MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

SUM content of rows

  Asked By: Fahimah    Date: Sep 06    Category: MS Office    Views: 2359

how to SUM content of rows by looping when some rows
are empty.



1 Answer Found

Answer #1    Answered By: Sebastien Anderson     Answered On: Sep 06

just test for null (or maybe "") before adding, if it fails the
test just more on.

dim total
dim row
dim col

col = 2

For Row = 1 to 10

if not isNull(cells(row,col).value) then
total = total + cells(row,col).value
end if

next row

Didn't find what you were looking for? Find more on SUM content of rows Or get search suggestion and latest updates.