+ Reply to Thread
Results 1 to 5 of 5

Solving Cirular Reference Equations In Different Cells With Macro / VBA

  1. #1
    Registered User
    Join Date
    03-09-2017
    Location
    CO, US
    MS-Off Ver
    2010
    Posts
    3

    Question Solving Cirular Reference Equations In Different Cells With Macro / VBA

    Hello All,

    I'm quite new to the VBA and Macro language, so please forgive my syntax and terminology errors.

    I'm working on a data entry sheet for an engineering/autodesk hand-shake, where a "customer" can give us the Conveying Width, and 1 of the 3 variables and the others will populate from the 'circular' equations. So I need to be able to read the value put into the cell, then off in another group of cells have a programmed function that reads and writes to the other cells.

    I've attached a simple picture of my 'Input sheet' variables.

    The Equations are relatively simple, and the conditions can be met easily with IF AND functions:

    Centerline = (OR-(CW+30)/2) or (IR+(CW+30)/2)
    Outside Radius = (CR+(CW+30)/2) or (IR+CW+30)
    Inside Radius = (CR-(CW+30)/2) or (OR-(CW+30))

    Excel Forum.PNG


    Thanks in advance!

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,612

    Re: Solving Cirular Reference Equations In Different Cells With Macro / VBA

    (How to) Upload a Workbook directly to the Forum
    (please do not post pictures or links to worksheets)
    • Click Advanced next to Quick Post button at the bottom right of the editor box.
    • Scroll down until you see "Manage Attachments",
    • Click the "Choose" button at the upper left (upload from your computer).
    • Select your file, click "open", click "upload"
    • Once the upload is completed the file name will appear below the input boxes in this window.
    • Close the Attachment Manager window.
    • Click "Submit Reply"
    Note: Please do not attach password protected workbooks/worksheets
    Ensure to disable any Workbook Open/Autorun macros before attaching!
    Ben Van Johnson

  3. #3
    Registered User
    Join Date
    03-09-2017
    Location
    CO, US
    MS-Off Ver
    2010
    Posts
    3

    Re: Solving Cirular Reference Equations In Different Cells With Macro / VBA

    Here's a mock up sheet with what I'm trying to attempt. I've made a simple (not fully functional) macro.

    Thanks in advance!
    Attached Files Attached Files

  4. #4
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,612

    Re: Solving Cirular Reference Equations In Different Cells With Macro / VBA

    Your sample only gave conveyingwidth (no sample calc) so I'm not sure about this sol'n.

    Formula(!) Name Formula
    _CL1 =(OutsideRadius-(ConveyingWidth+30)/2)
    _CL2 =(InsideRadius+(ConveyingWidth+30)/2)
    _IR1 =(CenterlineRadius-(ConveyingWidth+30)/2)
    _IR2 =(OutsideRadius-(ConveyingWidth+30))
    _OR1 =(CenterlineRadius+(ConveyingWidth+30)/2)
    _OR2 =InsideRadius+ConveyingWidth+30
    Choose equations corresponding to given values:

    For example:
    Please Login or Register  to view this content.
    since there are data vals in cells ConveyingWidth and centerlineradius, the count is 2 and _CL1 is calculated:

    given: CW, CR
    find: OR,IR

    _or1:= (CR + (CW + 30)/2)
    _or2:=(IR + CW + 30)
    -------------------------
    _ir1: CR - (CW + 30)/2)
    _ir2: OR - (CW + 30))
    -------------------------
    _cl1:= (OR - (CW + 30)/2)
    _cl2:= (IR + (CW + 30)/2)
    -------------------------
    Therefore:
    ---> OR = _OR1.........(that is, calculate OR using formula named _OR1!)
    ---> IR = _IR1
    Attached Files Attached Files
    Last edited by protonLeah; 03-10-2017 at 12:34 AM.

  5. #5
    Registered User
    Join Date
    03-09-2017
    Location
    CO, US
    MS-Off Ver
    2010
    Posts
    3

    Re: Solving Cirular Reference Equations In Different Cells With Macro / VBA

    Hey proton,

    Thank you! That was greatly informative! Building off that, is there a way to take those values calculated when the given is entered, and put them into the Given Column? I had a chance to speak with a friend who showed the power of the macro record, and I figured that making a button to press to update these numbers might be the easiest way to accomplish this.

    So thank you for giving me a starting point! If you might have any more advice that would be greatly appreciated! thanks!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Solving 2 nonlinear equations help!
    By akstempl in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-22-2013, 09:43 AM
  2. solving equations
    By eng.green in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-19-2013, 09:19 AM
  3. cirular reference in formula
    By theghost in forum Excel General
    Replies: 5
    Last Post: 02-15-2012, 04:25 AM
  4. solving equations
    By hmasenger in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-04-2011, 10:56 AM
  5. Solving equations
    By kvadre in forum Excel General
    Replies: 1
    Last Post: 03-27-2007, 04:19 PM
  6. solving equations using Excel
    By arnold_charming in forum Excel General
    Replies: 3
    Last Post: 12-07-2005, 02:55 PM
  7. solving equations using Excel
    By arnold_charming in forum Excel General
    Replies: 0
    Last Post: 12-07-2005, 12:30 PM
  8. VBA Macro for Solving Linear Equations
    By monir in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-27-2005, 11:05 AM

Tags for this Thread

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