How to convert a excel formaul in vb 6.0 function

RIAS
RIAS used Ask the Experts™
on
excel formula : C15*(1+$B$10)^(A16-A15)
                        1000 * (1+3.15%)^(1)
                        Excel result: 1,032
Not sure how to use it in visual basic 6.0

Cheers
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
This is an expample

Sub UseFunction()
    Dim myRange As Range
    Set myRange = Worksheets("Sheet1").Range("A1:C10")
    answer = Application.WorksheetFunction.Min(myRange)
    MsgBox answer
End Sub


for more : click here

For the above example you have to use formulas such as SUM, PRODUCT et al

The list of available formulas click here.
Inserting a Worksheet Function into a Cell

To insert a worksheet function into a cell, you specify the function as the value of the Formula property of the corresponding Range object. In the following example, the RAND worksheet function (which generates a random number) is assigned to the Formula property of range A1:B3 on Sheet1 in the active workbook.

Sub InsertFormula()
    Worksheets("Sheet1").Range("A1:B3").Formula = "=RAND()"
End Sub

Author

Commented:
Cheers mate

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial