+ Reply to Thread
Results 1 to 5 of 5

Using a cell reference to nominate which macro to run

  1. #1
    Registered User
    Join Date
    10-28-2013
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    22

    Using a cell reference to nominate which macro to run

    Hi All,

    I hope this is a simple one and someone can help.

    I have a spreadsheet with a bunch of recorded macros. Each week I run them in a particular order, but that order will vary from week to week (it is based on sports matches). What I would like to do is to be able to run them in an order that is defined by specific cells in a spreadsheet

    For example, one week I might have Niners, Jets, Chiefs, Seahawks in cells A1, A2, A3 and A4. What I want to do is run four macros with the same name in that order.

    The following week it might be Ravens, Raiders, Colts and Patriots in these cells.

    So I guess what I am trying to ask is whether there is a way of using a cell to reference a named macro.

    Thanks in advance.

    Shaun

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,481

    Re: Using a cell reference to nominate which macro to run

    It will go in chronological order

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    10-28-2013
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: Using a cell reference to nominate which macro to run

    Thanks for the prompt response Dave - much appreciated.

    I'm not 100% sure I understand what you mean. Here is a simple example of what I trying to do - apologies if I have misunderstood your response:

    Application.Run "'multimacro.xlsm'!Sorta"

    Rather than using the macro name Sorta, if I had Sorta in cell A1, is there a way of using the text in that cell to nominate the macro to run.

    Cheers,

    Shaun

  4. #4
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,481

    Re: Using a cell reference to nominate which macro to run

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    10-28-2013
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: Using a cell reference to nominate which macro to run

    Thanks for taking the time Dave - your help is very much appreciated!

+ 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. Using Macro to change cell color based on reference cell value in different sheet
    By Emma Ford in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-09-2015, 03:51 AM
  2. [SOLVED] Formula/Macro to give active cell reference in cell
    By ExcelFailure in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-23-2014, 03:36 AM
  3. Replies: 1
    Last Post: 11-06-2013, 02:56 AM
  4. Replies: 3
    Last Post: 10-29-2013, 12:06 AM
  5. Macro that shifts a cell's reference cell down one each time
    By emalts in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-06-2013, 12:06 PM
  6. Macro - Select cell based on cell reference
    By akaUriel in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-17-2011, 11:44 AM
  7. Change a macro to from and absolute cell reference to selected cell.
    By dcgrove in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-05-2010, 01:19 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