+ Reply to Thread
Results 1 to 5 of 5

Formula evaluating itself 'on the fly' or a vba macro

  1. #1
    Registered User
    Join Date
    09-24-2012
    Location
    Homie
    MS-Off Ver
    Excel 2003
    Posts
    8

    Iterating macro with variables stored in cells

    Hello,

    I find myself in a need of a macro or a formula that would solve the following.

    In G1 I've got a number or iterations, which is going to change, depending on other conditions.
    In H1 I've got a constant- but it will also change depending on other conditions which is not ipmortant at the moment. Though it has to be stored in this cell, but for the following columns both can be considered constant numbers.
    In column "I" I need to perform a subtraction of:
    for i=1 to G1 do
    I(i)-H1

    Similarly in column 'J'
    for i=1 to G1 do
    D(i)*(1-0,1)^F(i)

    Could someby be so kind and post either a formula or a macro that would do the above? I'm fairly new to excel and don't know vba script yet.
    Last edited by dziabdak; 09-26-2012 at 09:10 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    03-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    1,093

    Re: Formula evaluating itself 'on the fly' or a vba macro

    Hello there,

    Could you supply a sample workbook that mimics what you are trying to achieve?

    Thanks!

  3. #3
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Formula evaluating itself 'on the fly' or a vba macro

    Please read and adhere to these simple rules!
    1. Use concise, accurate thread titles. Your post title should describe your problem, not your anticipated solution. .....

    what's your goal ?
    If solved remember to mark Thread as solved

  4. #4
    Registered User
    Join Date
    09-24-2012
    Location
    Homie
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Formula evaluating itself 'on the fly' or a vba macro

    EDIT: Pardon petel45. I tried to edit thread title, but there seems to be some sort of glitch and changes are not getting saved.

    Hm, I believe I managed to alter other macro I had. The code looks awful, but it works in the frst case and I'm trying to get the second case working as well.
    Please Login or Register  to view this content.
    I belive I could throw away .Row = 1 line, but I didn't want to mendle too much.
    I need a similar thing for column "J", which I intend to do this way:
    Please Login or Register  to view this content.
    Accordingly I believe this macro should work if I throw away
    Please Login or Register  to view this content.
    And
    Please Login or Register  to view this content.
    Last edited by dziabdak; 09-26-2012 at 09:20 AM.

  5. #5
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Formula evaluating itself 'on the fly' or a vba macro

    did you read my post ? the title was good, but you did not describe your problem, your goal.
    You only anticipated solution

+ 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