+ Reply to Thread
Results 1 to 7 of 7

Automatically update an "If" formula at the start of a macro

  1. #1
    Registered User
    Join Date
    03-27-2012
    Location
    Crawley
    MS-Off Ver
    Excel 2010
    Posts
    27

    Automatically update an "If" formula at the start of a macro

    Hi all,

    I have this formula linked to another workbook:

    Please Login or Register  to view this content.
    What would I need to do to have this result automatically update at the start of a Macro I use?

    Thanks,

    Derry

  2. #2
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Automatically update an "If" formula at the start of a macro

    I am not sure I follow, would the formula not update as soon as you open the book? Or is the other book closed?
    Be fore warned, I regularly post drunk. So don't take offence (too much) to what I say.
    I am the real 'Napster'
    The Grid. A digital frontier. I tried to picture clusters of information as they moved through the computer. What did they look like? Ships? motorcycles? Were the circuits like freeways? I kept dreaming of a world I thought I'd never see. And then, one day...

    If you receive help please give thanks. Click the * in the bottom left hand corner.

    snb's VBA Help Files

  3. #3
    Registered User
    Join Date
    03-27-2012
    Location
    Crawley
    MS-Off Ver
    Excel 2010
    Posts
    27

    Re: Automatically update an "If" formula at the start of a macro

    Hi,

    The other book usernameshow will be closed, the book that this macro is in will be open all the time, hence the result may well change while you are using it.

    That's why I need to have it update when a macro runs.

    Cheers.

  4. #4
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Automatically update an "If" formula at the start of a macro

    What does the macro that you run do? I still can't follow what is happening. Forgive my dullness

  5. #5
    Registered User
    Join Date
    03-27-2012
    Location
    Crawley
    MS-Off Ver
    Excel 2010
    Posts
    27

    Re: Automatically update an "If" formula at the start of a macro

    Sorry, it's my fault for not explaining very well.

    Essentially, I have a macro that copies a lot of information to a master workbook from within this sheet (usernameshow is the example master)

    I have it set so that if the master is in use, or read only, it updates the users workbook with the name of who is in the master so they know who to contact if they need urgent access to edit it.

    The problem I am having is that you have to always select the cell and hit enter to run the formula for it to update, I need to update it when the user hits the macro button.

    Essentially, I need something that will say to select the cell the formula is in, hit enter, and then continue with the macro, or if there's an easier way so be it.

    I hope that explains it a little better.

    Thanks.

  6. #6
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Automatically update an "If" formula at the start of a macro

    Ahh Ok, try this,

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    03-27-2012
    Location
    Crawley
    MS-Off Ver
    Excel 2010
    Posts
    27

    Re: Automatically update an "If" formula at the start of a macro

    Thanks Dave, however it is throwing up an error and not accepting this:
    Please Login or Register  to view this content.
    between that code.

    Any ideas what I should wrap it with for this to work?

+ 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