Computing.Net > Forums > Office Software > Excel VB formula not auto update

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Click here to start participating now! Also, check out the New User Guide.

Excel VB formula not auto update

Reply to Message Icon

Name: alpha314
Date: February 7, 2006 at 19:10:11 Pacific
OS: Win 2000
CPU/Ram: P4-1.6/256
Comment:

Someone help me using Excel VBAProject to write a formula:

Function mySum(firstCell As Range, interval As Integer, lastCell As Range)
temp = 0
For i = firstCell.Row To lastCell.Row Step interval
temp = temp + Cells(i, firstCell.Column)
Next i
mySum = temp
End Function

This is formula under Module1.

End line of Excel sheet, I enter :" mySum(c5,9,c275)".
Because I want adding every nine line number togather ( example = c5+c14+c23+c32 ... until to +c275 ).

Now this formaula is working. but problem is -- this formula can not auto update, this mean that every time I change or add new number, it can not sum and make new sum ( still keep old sum number ). I have to re-enter " mySum(c5,9,c275)" and enter, then new sum came out.

I don't know what is wrong? I don't know how to fix this problem ?
It shall auto update by that formula.

Someone told me I need setup run macro into module1.

I don't know how to do this let run macro into module1 ?



Sponsored Link
Ads by Google

Response Number 1
Name: seawatch
Date: February 11, 2006 at 05:39:01 Pacific
Reply:

What is the "9" in there for?

Larry

Today seems like a good day to chew through the restraints.


0
Reply to Message Icon

Related Posts

See More


Letterhead for outlook em... Ami Pro 3.1



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Office Software Forum Home


Sponsored links

Ads by Google


Results for: Excel VB formula not auto update

Links in Word will not auto-update www.computing.net/answers/office/links-in-word-will-not-autoupdate/6390.html

How to writ a formula in Excel www.computing.net/answers/office/how-to-writ-a-formula-in-excel/311.html

Excel 2007 formulas not updating when copying www.computing.net/answers/office/excel-2007-formulas-not-updating-when-copying/9588.html