Thanks Thanks:  0
Likes Likes:  0
Results 1 to 4 of 4

Thread: Help with getting variable outputs from a single input

  1. #1
    New Member
    Join Date
    Aug 2017
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Help with getting variable outputs from a single input

    Hello,

    I like to think I'm fairly proficient at Excel, but this has really stumped me. I've tried searching, but I'm not really sure what I'm asking for.

    Basically I have a sheet with a number of formulae spread across it, with numerous inputs and formulae leading on from each other. What I want to create is a list of outputs when I alter one of the input variables.

    So, I thought I could create a list of the input variables on another sheet, then interrogate the output cell so that I get an answer if the input cell equals the cell in my list. I've added a screenshot if that helps?

    Excel problem.fw.png - Google Drive

    I thought an IF function might do it, but I want to place each value in to the cell and see the output, not check a cell equals a value.

    I really don't want to have to do this manually as it'll potentially take about as long as I've already spent trying not to do it manually!

    Typical engineering student eh..?

    If I've just confused you, please do say and I'll try to explain it better.

    Mik

  2. #2
    Board Regular Akuini's Avatar
    Join Date
    Feb 2016
    Location
    Indonesia
    Posts
    989
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Help with getting variable outputs from a single input

    Ok, try this:
    In this example:
    A2 = input
    B2 = output
    D2 down = input list
    E2 down = output list, itís the result generated by the code
    The formula in B2 Ď=A2*20í



    Please use Code Tags when posting a code. Like this: [CODE ]Your Code Here[/ CODE]
    Code:
    Sub a1018625a()
    Dim i As Long, va
       
        Application.ScreenUpdating = False
        Application.Calculation = xlCalculationManual
     
     
        va = Range("E2", Cells(Rows.count, "E").End(xlUp))
       
        For i = 1 To UBound(va, 1)
            Range("A2") = va(i, 1)
            Range("B2").Calculate
            Range("F" & i + 1) = Range("B2")
        Next
     
        Application.ScreenUpdating = True
        Application.Calculation = xlCalculationAutomatic
     
    End Sub



    Excel 2007 32 bit
    A
    B
    C
    D
    E
    F
    1
    input output input list output list
    2
    10
    200
    1
    20
    3
    2
    40
    4
    3
    60
    5
    4
    80
    6
    5
    100
    7
    6
    120
    8
    7
    140
    9
    8
    160
    10
    9
    180
    11
    10
    200
    Sheet: Sheet2

  3. #3
    New Member
    Join Date
    Aug 2017
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Help with getting variable outputs from a single input

    Thanks for the help, although I haven't used Visual Basic before, so I was reduced to following an online tutorial how to use it.

    It seemed to just give me a list of unrelated numbers after I altered it, so I gave up and did it the long way around.

    Thanks anyway!

  4. #4
    Board Regular Akuini's Avatar
    Join Date
    Feb 2016
    Location
    Indonesia
    Posts
    989
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Help with getting variable outputs from a single input

    Ok, glad you figured it out.

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners.
     


DMCA.com