Posts by student001

    here is the actual code that I am working on


    and the code continues..

    Hello everyone,

    I am working on a vba code.


    I have a function in terms of x, say (x)^2 + x.

    I want to find values of this function for different values of x, say from 1 to 5.

    For that I am using a 'for next' loop.

    Example,

    For x = 1 To 5

    fx(x,1) = (x)^2 + x

    Next x


    But problem is that, this is not the only function. I want these values for any other functions of 'x', say cos(x), etc.

    And I want this function to be given by a user as a sting in terms of 'x' either as an input in a cell or as input in inputbox and then I want to use this in 'for next' loop.

    This is like converting a string to function with variable as 'x'.


    Please help me. How to do this.

    Thank you in advance.