Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi. I've written the following simple function that
appears to work well. However, at various times I will receive the #VALUE error and will need to hit F9 (recalculate) to get the correct answers. This happens repeatedly if I open another workbook, change something, and come back. My code is: Option Explicit Function InviteBack(myType, myMonth) Application.Volatile True Dim myRange As range Dim j As Integer Set myMonth = Worksheets(myMonth) Dim myCell As range j = 0 Set myRange = myMonth.range("n4:n39") For Each myRange In myRange.Cells If myRange.Formula = myType Then If UCase((myRange.Cells.Offset(0, 4).Formula)) = "Y" Then j = j + 1 End If End If Next InviteBack = j End Function Thanks, Mike. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Table function, 2 variables. Problem with update/refresh | Excel Worksheet Functions | |||
Refresh/Recalculate a Custom Function | Excel Worksheet Functions | |||
Customized function (in cell) does not refresh value :o( | Excel Discussion (Misc queries) | |||
student needing help w/vlookup function grading criteria | Excel Worksheet Functions | |||
function values do not refresh | Excel Worksheet Functions |