Hello, I am trying to do a average formula for the month. I want to be able to add sheets to the workbook with out it giving errors or making the sheets as I go. I thought I knew the steps but I am getting error #REF! the error type is 4
When I debug the formula I find that this line is causing the stop.
Function FirstSheetName() As String
Application.Volatile True
--->With Application.Caller.Parent
FirstSheetName = _
.Parent.Worksheets((.Index Mod .Parent.Worksheet.Count) + 2).Name
End With
End Function
The With Application.Caller.Parent is where I am getting stuck. I am working in Excel 2000. I have used the +2 as I want to use second sheet from this one to start the formula.
My goal is to have cell formula that will be
=average('FirstSheetName():LastSheetName()'!B14)
I am not sure yet if I need to use Indirect. Right now the formulas aren't working. I would love any feed back from anyone on this. Thanks !
Eric
When I debug the formula I find that this line is causing the stop.
Function FirstSheetName() As String
Application.Volatile True
--->With Application.Caller.Parent
FirstSheetName = _
.Parent.Worksheets((.Index Mod .Parent.Worksheet.Count) + 2).Name
End With
End Function
The With Application.Caller.Parent is where I am getting stuck. I am working in Excel 2000. I have used the +2 as I want to use second sheet from this one to start the formula.
My goal is to have cell formula that will be
=average('FirstSheetName():LastSheetName()'!B14)
I am not sure yet if I need to use Indirect. Right now the formulas aren't working. I would love any feed back from anyone on this. Thanks !
Eric