+ Reply to Thread
Results 1 to 6 of 6

Using VBA to update automate a formula

  1. #1
    Forum Contributor
    Join Date
    02-10-2013
    Location
    Wolverhampton
    MS-Off Ver
    Excel 2010
    Posts
    101

    Using VBA to update automate a formula

    Hi all, if I have a simple formula such as =a1, can I use VBA to update it to a2?

    Would really appreciate the help

  2. #2
    Forum Contributor
    Join Date
    03-12-2013
    Location
    Chicago, USA
    MS-Off Ver
    Excel 2007
    Posts
    230

    Re: Using VBA to update automate a formula

    What do you mean when you say update? It sounds like you want to copy the value from A1 into A2.

  3. #3
    Forum Contributor
    Join Date
    02-10-2013
    Location
    Wolverhampton
    MS-Off Ver
    Excel 2010
    Posts
    101

    Re: Using VBA to update automate a formula

    No, I basically just want the formula "=A1" to change to "=A2", can that be done using VBA

  4. #4
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Using VBA to update automate a formula

    Perhaps something like this?

    Please Login or Register  to view this content.
    Alf

  5. #5
    Forum Contributor
    Join Date
    02-10-2013
    Location
    Wolverhampton
    MS-Off Ver
    Excel 2010
    Posts
    101

    Re: Using VBA to update automate a formula

    Thats great, just one slight problem though, if I insert the code into a macro button, how can I make sure that everytime I click the macro button, the cell changes, for example if I click it once then the cell changes from A1 to A2, if I click the button again then the cell changes to A3, is there a way to do that?

  6. #6
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Using VBA to update automate a formula

    You could try this macro then. Have not done any extensive testing but the way it's written it should work up to A10.

    Please Login or Register  to view this content.
    Alf

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 2
    Last Post: 04-10-2013, 01:39 PM
  2. How to automate update cells' values
    By cyberguest in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-31-2013, 07:42 PM
  3. How to automate a formula on a table
    By padraigb in forum Excel General
    Replies: 5
    Last Post: 05-09-2010, 09:41 PM
  4. Automate update from 3 files to 1.
    By saugui in forum Excel General
    Replies: 2
    Last Post: 09-27-2006, 07:48 PM

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