Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Spreadsheets (https://www.askmehelpdesk.com/forumdisplay.php?f=395)
-   -   I need a macro to respond to a vlookup command (https://www.askmehelpdesk.com/showthread.php?t=300672)

  • Jan 7, 2009, 08:38 PM
    natanab
    I need a macro to respond to a vlookup command
    I understand the basics of Macros programming and have recorded a series of Macros within a workbook. What I want to happen is that when someone chooses an item in a drop down list, depending on which item they choose it will run one of the Macros. If they change their mind it will then run a new macro that will change other parts of the spreadsheet. I am using excel 2007.
  • Jan 7, 2009, 09:31 PM
    bumble1290

    I want to do exactly the same thing only I'm using excel 2003
  • Jan 7, 2009, 09:36 PM
    JBeaucaire

    Macros are fine, but you want to run macros from formulas? That's reinventing the wheel. If you want a macro to run to coincide with something in a cell, put some macro buttons on the screen and just let people "click" them. The first thing the macro does is set that cell to the value you want for that macro, then proceed through the rest of its task.

    So if the box originally had 3 choices in a drop down, just put 3 buttons nearby instead.
  • Jan 7, 2009, 09:37 PM
    JBeaucaire
    BTW, tell me what you want happening off those choices, what do these macros do?

    Perhaps macros are also overkill, sometimes formulas are still the best approach to some tasks.
  • Jan 8, 2009, 06:11 AM
    mdosh01
    Check this out. It will do exactly what you asked.

    Run a Macro depending on the value selected from the drop-down list : Visual Basic for Applications (VBA) : Microsoft ISV Community Center : MSDN Forums

    Good luck.
  • Jan 8, 2009, 01:52 PM
    bumble1290

    Thanks for your replies, upon reflection and messing around with basic marcos yesterday, I think Vlookup might be a better option for what I'm trying to achieve.
  • Jan 15, 2009, 05:37 PM
    TheCodeCageTeam
    If you use a formula to reflect chabges across the worksheet remember that these are dependent on the structure of your worksheet remaining constant. Do use a macro if you want to change multiple cells for different values but have them static until the next time you run the code!
    Quote:

    Originally Posted by natanab View Post
    I understand the basics of Macros programming and have recorded a series of Macros within a workbook. What I want to happen is that when someone chooses an item in a drop down list, depending on which item they choose it will run one of the Macros. If they change their mind it will then run a new macro that will change other parts of the spreadsheet. I am using excel 2007.


  • All times are GMT -7. The time now is 05:24 AM.