+ Reply to Thread
Results 1 to 4 of 4

Modifying VB Code:Excell Macro and Visal Basic Programming

  1. #1
    Registered User
    Join Date
    08-27-2009
    Location
    GR
    MS-Off Ver
    Excel 2007
    Posts
    2

    Modifying VB Code:Excell Macro and Visal Basic Programming

    Hello All.

    I am very new to using Excell Macros, infact just a few hours of use till now.I need a quick help on Macros.
    I have a formula in cell B4, which I would normally drag all the way to another cell,B14 .So I created the macro , by pushing the record Macro option. Here it is below.

    Please Login or Register  to view this content.
    Question : How can I change this script so that the Macro is executed from cell B4 to BX , the number X , would be decided by a value in cell B2. If the value is 10 ,
    then the macro should execute from "Cell:B4" till "Cell:Address of B4 + 10"
    Last edited by aero777; 08-27-2009 at 02:07 AM. Reason: Complying to Forum Rules

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Modifying VB Code:Excell Macro and Visal Basic Programming

    Without knowing the actual formula in B4 I would opt for something along the lines of:

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    08-27-2009
    Location
    GR
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Modifying VB Code:Excell Macro and Visal Basic Programming

    Hello,

    Thank you for your reply....

    WoW!

    That works... Thank you again..

    Untill my next querry!
    My Best Regards,
    Aero777
    Last edited by aero777; 08-27-2009 at 06:57 AM.

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Modifying VB Code:Excell Macro and Visal Basic Programming

    re: the formula... INDEX should suffice and has the added advantage of being non-volatile unlike the existing formula

    Please Login or Register  to view this content.
    In code terms just apply the formula in one go (including B4 itself)

    Please Login or Register  to view this content.
    Where B2 contains how many extra formulae are required in addition to that in B4.

+ 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