Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
I can only manually update?
Hey everyone, Thanks for the help provided me thus far, but now I am having a differnt problem. The spreadsheet is set up with 4 worksheets. The first 2 taking input from the user, the third a sheet of constants and the forth displaying results. On this results page I have a function set up that compares a value in the column currently active (this being on the forth sheet still) to a value on the second page. If they are the same it reads another value from the second page and returns that to formula. The problem is when I update the values on the second sheet it does not update the function value on the forth. I have read about a calculate subroutine but I can't get that to work. Any Idea's? Here is the code: Code: -------------------- Option Explicit Public Function eb(additive2 As Integer) As Double Dim count As Integer additive2 = Application.ThisWorkbook.Worksheets("Results").Cel ls(6, Application.ActiveCell.Column).Value eb = 0 count = 6 For count = 6 To 10 If Application.ThisWorkbook.Worksheets("Additive-Flush").Cells(count, 8).Value = additive2 Then eb = Application.ThisWorkbook.Worksheets("Additive-Flush").Cells(count, 14).Value + eb Else eb = eb + 0 End If Next count End Function -------------------- Thank you ~Jason -- jclark419 ------------------------------------------------------------------------ jclark419's Profile: http://www.excelforum.com/member.php...o&userid=25430 View this thread: http://www.excelforum.com/showthread...hreadid=389051 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
I can only manually update?
Add a line somewhere (after the Dim would be a good place):
Application.Volatile "Marks a user-defined function as volatile. A volatile function must be recalculated whenever calculation occurs in any cells on the worksheet. A nonvolatile function is recalculated only when the input variables change. This method has no effect if it's not inside a user-defined function used to calculate a worksheet cell." Note that there has to be something else on that sheet that calculates in order for this to take effect. -- - K Dales "jclark419" wrote: Hey everyone, Thanks for the help provided me thus far, but now I am having a differnt problem. The spreadsheet is set up with 4 worksheets. The first 2 taking input from the user, the third a sheet of constants and the forth displaying results. On this results page I have a function set up that compares a value in the column currently active (this being on the forth sheet still) to a value on the second page. If they are the same it reads another value from the second page and returns that to formula. The problem is when I update the values on the second sheet it does not update the function value on the forth. I have read about a calculate subroutine but I can't get that to work. Any Idea's? Here is the code: Code: -------------------- Option Explicit Public Function eb(additive2 As Integer) As Double Dim count As Integer additive2 = Application.ThisWorkbook.Worksheets("Results").Cel ls(6, Application.ActiveCell.Column).Value eb = 0 count = 6 For count = 6 To 10 If Application.ThisWorkbook.Worksheets("Additive-Flush").Cells(count, 8).Value = additive2 Then eb = Application.ThisWorkbook.Worksheets("Additive-Flush").Cells(count, 14).Value + eb Else eb = eb + 0 End If Next count End Function -------------------- Thank you ~Jason -- jclark419 ------------------------------------------------------------------------ jclark419's Profile: http://www.excelforum.com/member.php...o&userid=25430 View this thread: http://www.excelforum.com/showthread...hreadid=389051 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to update one manually-entered value from another? | Excel Worksheet Functions | |||
Does this have to be done manually? | Excel Discussion (Misc queries) | |||
Manually Update Listindex | Excel Programming | |||
Manually update links | Excel Worksheet Functions | |||
VBA calculate manually | Excel Programming |