Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

Summing a range

  Asked By: Bennu    Date: Dec 01    Category: MS Office    Views: 903
  

I created an Excel workbook that has a macro opens others spreadsheet
files. It has vba code that reads data on sheet 1 and writes data onto
sheet 3 of the workbook that I opened.
The number of rows varies from one spreadsheet to another.
So for example I processed 9 rows of data, headings are in the first
rows. For column C I want sum C2:C10 and place the formula in C11.

I have a variable that tells me how may rows I have processed.
Does anyone have any suggestions?

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Abbas Hashmi     Answered On: Dec 01

well if you have a variable  that tells you how many rows... use that
variable something like this

range("c" & var + 1).formula = sum("c1":"c" & var)
just air code.. but i think something like this should do it

 
Didn't find what you were looking for? Find more on Summing a range Or get search suggestion and latest updates.




Tagged: