+ Reply to Thread
Results 1 to 4 of 4

loop formula to occur "N" times

  1. #1
    Registered User
    Join Date
    03-29-2007
    Location
    Missouri, USA
    Posts
    29

    loop formula to occur "N" times

    hello. I'll preface this by saying i have limited VBA experience.

    I have a formula that i want to run N times, where N is the number of decimal places in a cell reference.

    I'm attempting to convert a performance scale that goes from 100% - 110% to 100% - 150%

    Please Login or Register  to view this content.

  2. #2
    Forum Contributor
    Join Date
    02-27-2008
    Posts
    764

    macro

    It is not clear to me where you draw the value of N from.
    Assuming N = 5
    try the following codes
    Please Login or Register  to view this content.
    Run the macro. it will place the calculated values in col R rows 1 to N.
    Ravi

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    I'm attempting to convert a performance scale that goes from 100% - 110% to 100% - 150%
    The formula =5*A1 - 4 converts a number in A1 in the range of 1 to 1.1 (i.e., 100 to 110%) to 1 to 1.5 (100 to 150%)

    If ravishankar's code doesn't do what you wish, could you please clarify what you're trying to do?
    Last edited by shg; 07-16-2008 at 01:56 PM.

  4. #4
    Registered User
    Join Date
    03-29-2007
    Location
    Missouri, USA
    Posts
    29
    N is the number of values after the decimal place. for instance, with 105.4897 N=4



    SHG, your formula looks much simpler, and was what i started trying to find on my own. i have to ask though, how did you come up with the 5 and the 4? The scale range i gave as an example was only on scenario, there are more ranges i have to convert.

+ 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