+ Reply to Thread
Results 1 to 4 of 4

Run macro when entering a value in one of two colums

  1. #1
    Registered User
    Join Date
    12-18-2012
    Location
    Tilburg, Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    13

    Run macro when entering a value in one of two colums

    Hello all,

    I am just starting out with vba macros and so far it worked out pretty well, but now i have ran into a concrete wall with this one;

    What I want to do is run a macro when I put a value into a column (either column K or M) also the macro that will run in this instance needs to use some
    information of the particular row in which the change takes place. So for example I will enter a value in cell k18 and the macro will run using information of row 18.


    Can anyboy help me with this one?

    Thanks a million!

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Run macro when entering a value in one of two colums

    Hi Brammer,

    You want a Worksheet_Change event:

    Please Login or Register  to view this content.
    Directions for running the routine(s) just supplied

    Copy the code to the clipboard

    Open your Workbook

    Press ALT + F11 to open the Visual Basic Editor.

    Select Your Worksheet from the Insert menu

    Type "Option Explicit" then paste the code under it

    and you're ready to go!

    Do you know how to put the row as an argument in YourMacro? If not maybe you can post your macro and I'll code it for you
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Registered User
    Join Date
    12-18-2012
    Location
    Tilburg, Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: Run macro when entering a value in one of two colums

    Thanks a lot! works perferct like this. did not know about this target and or change worksheet commands. Thanks!

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Run macro when entering a value in one of two colums

    You're welcome!

+ 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