View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Matt Roberts Matt Roberts is offline
external usenet poster
 
Posts: 4
Default For Each Next returns "Empty" when Data in Cell

I have written a function with the intention of iterating the function
(rather than the workbook) but am having difficulty pulling the information
through:

Public Function Iterative_LIBOR(Target As Double, Frequent As Double,
Periods_Range As Range, Swaps_Range As Range, Nominals_Range As Range,
LIBORs_Range As Range)

Cycle = 1
Freq = Frequent
DCF = 0

'Build the Discount, Period, LIBOR and Nominal Arrays

Dim Period_Array(1 To 100) As Variant

For Each ActualCell In Periods_Range.Cells

If ActualCell.Value 0.001 Then

Period_Array(Cycle) = ActualCell.Value

Else
End If

Cycle = 1 + Cycle

Next ActualCell

Although the Range Periods_Range is populated with data the "Watch" gives
each value as "Empty". Can any one help?

Thank you
--
Matt Roberts