Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA Excel Auto Sub

Status
Not open for further replies.

dprayner

Programmer
Oct 14, 2002
140
US
Hi good people.

I want to set up a formula in VBA to auto sum a column of amounts.

I have a for loop so that I can count the number of rows (which changes day to day). I set up the variable num to store the number of rows.

The beginning row is E3. What formula would I use to auto sum the column from E3 to E num?

DAVE
 
Perhaps this ?
yourRange.Formula = "=SUM(E3:E" & num)

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top