+ Reply to Thread
Results 1 to 2 of 2

Need help creating a function with loop.

Hybrid View

  1. #1
    Registered User
    Join Date
    03-17-2009
    Location
    Vancouver, Canada
    MS-Off Ver
    Excel 2007
    Posts
    1

    Need help creating a function with loop.

    This one has been giving me a lot of trouble. I'm trying to create a function that uses two input values selected in a userform to produce a desired output (please see attachment). The problem I'm having is that I'm creating a separate function for each "dynamic variable" and so I've got 25 output values when I'd like to have only one. Is this possible? My guess is that a loop needs to be created with different step values (I just don't know how to do that).
    Any help is greatly appreciated.
    Gabe
    Attached Files Attached Files

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Need help creating a function with loop.

    Hi,

    Can you describe in words what value you're trying to achieve in your Output cell E16.

    I can of course understand the formulae, but it's not apparent to me why some of the terms seem to vary. For instance the first If test seems fairly straightforward, and varies on a strict linear basis, whereas say the fourth If test seems to return the same value 1 for 7 cells and thereafter 2,3,4,5 for each of 4 cells.

    There may be a simpler way of achieving a single compound formula without needing a table at all. An understanding of your aim would help immensely.

    Regards
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

+ 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