Converting EasyLanguage to Excel

T

Titanus

Is anyone familiar enough with EasyLanguage to convert the following to
Excel:

Period = 0;
Value = 0;
For count = 0 to 50 begin
Value = Value + Interest[count];
If Value > 100 and Period = 0 then begin
Period = count;
end;
end;


I'm not familiar with EasyLanguage and I'm not sure about the direct
translation. Thanks for the assist!
 
G

Gary''s Student

ub titanus()
Dim interest(50)
Period = 0
valu = 0

For i = 1 To 50
interest(i) = 5
Next

For Count = 1 To 50
valu = valu + interest(Count)
If valu > 100 And Period = 0 Then
Period = Count
End If
Next
End Sub


Note that the loop initializing interest can be changed to suit your needs.
 
T

Titanus

Gary, thanks alot for the response. One question....any idea how to
pull this off without using a VBA function?

Gary''s Student said:
ub titanus()
Dim interest(50)
Period = 0
valu = 0

For i = 1 To 50
interest(i) = 5
Next

For Count = 1 To 50
valu = valu + interest(Count)
If valu > 100 And Period = 0 Then
Period = Count
End If
Next
End Sub


Note that the loop initializing interest can be changed to suit your needs.
--
Gary''s Student


Titanus said:
Is anyone familiar enough with EasyLanguage to convert the following to
Excel:

Period = 0;
Value = 0;
For count = 0 to 50 begin
Value = Value + Interest[count];
If Value > 100 and Period = 0 then begin
Period = count;
end;
end;


I'm not familiar with EasyLanguage and I'm not sure about the direct
translation. Thanks for the assist!
 
Top