+ Reply to Thread
Results 1 to 9 of 9

Incrementing equations

  1. #1
    farfromapro
    Guest

    Incrementing equations

    Background:

    I'm using the output of this to create a graphed set of points in a CAD software.... I will need excel to evaluate an equation at different, incremented, values

    I would like to input 3 numbers... a minimum, maximium, and an increment.

    I would then want excel to then fill in cells where the first starts at the minimum, next increments the minimum by the increment value and so on, as many times as it takes to reach the maximium.

    so if I input (min,increment,max) as 0,1,5 I want a column that has rows 1,2,3,4,5,6 to be 0,1,2,3,4,5 respectively....

    I appreciate any help anyone can offer on this topic!!!

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,887
    Will you always be entering the Min, Increment and Max values in the same cells, and will the results always be in the same column starting in the same cell?

    For example, do you always put the Min, Increment and Max in A1, B1 and C1, and the results show up in A2 through A_?

    If so, in A2 you could put the formula:
    =A1

    In A3 and filled downward you could use:
    =IF(ISERROR(IF(A2+$B$1>$C$1,"",A2+$B$1)),"",IF(A2+$B$1>$C$1,"",A2+$B$1))

    That formula could be shorter by taking out the error check, but then you'll be left with #VALUE! errors in cells after the MAX has been reached.

  3. #3
    farfromapro
    Guest
    Your good!!
    Thank you for the help!!!

    I will map the forms inputs of min, increment, max to A1,B1,C1 respectivley!

    The only issue is now I have to manually fill in the correct number of rows.

    Any idea on that?

    I think i've come across some API methods that will allow that equation to be used from the min value up until a value is equal to the max value...

    so now I will have a column full of incremented values that will be "plugged" into the same equation (in d3 say)...

    looks like i'll end up with a column of increments and then another column with solutions to the equation at respective incremental values..... NICE!

    I have to find a good way to loop the "filling" of that equation!

    Thanks!!!!!

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,646
    Can't you just use Edit>Fill>Series...?

  5. #5
    farfromapro
    Guest
    interesting thought...Thank you!

    I'm not sure how to make the API call to the stop value in the fill series input box yet...

    So my code will include a sub procedure that will fill a series based on min, increment, and max values inputed....

    Great thinking!!!! you guys are the best!!!!!

    I'll post an update... Thanks again!!!!

  6. #6
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,646
    What makes you think you need an API call?

    Or even to show that particular dialog?

  7. #7
    farfromapro
    Guest
    The purspose of excel, in my particular application, is to "crunch numbers" and generate X, Y, Z coordinates for points found by evaluating equations using different variables...

    so... I have a user form (GUI, input box,..etc.) that the user of a CAD software accesses... after inputing data such as equations, evaluation variable limits (min, max, increments) a button is clicked... this button has a macro behind it which will do the following... with your help

    take the min value inputed and increment it (in rows of one column), using the increment number inputted in the form, until it reachs the max...

    after that solutions for each equation evaluated will spit out X Y Z data

    then the data is brought back into a CAD software where a game of high end connect the dots gets played!!

    i'm attempting stuff like

    dataseries ([a3], [type:= xlinear], [Date:=xlDay], [Step:=b1], [Stop:=b3], [Trend:=False)

    but it is not working... all the other dataseries calls I can find seem to need the user to input a cell range...
    Last edited by farfromapro; 08-14-2007 at 12:54 PM.

  8. #8
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,646
    Well for a start that isn't an API call, it's almost VBA.

    But you've got the syntax all wrong.

    I suggest you try recording a macro when you Fill>Series... manually to get the syntax.

    That's what I did for another problem.

    And this is what I came up with.
    Please Login or Register  to view this content.
    This monitors A1 on a worksheet then puts a series in column B starting in row 3 based on it's value.

  9. #9
    farfromapro
    Guest
    "thats almost VB".... ha ha ...so true... I still can't "speak" that language!!

    i recorded a macro of the edit fill but it based the dataseries on my pre-selection...

    I have to keep playing with it...

    what you put down looks like a good start for me...I have to try that...

    I don't think i'll get back to it until tonight or tomrrow...

    THANK YOU!!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1