+ Reply to Thread
Results 1 to 7 of 7

running a macro when specific text is entered into a specific cell

  1. #1
    Registered User
    Join Date
    04-20-2014
    Location
    Derby
    MS-Off Ver
    Excel 2010
    Posts
    59

    running a macro when specific text is entered into a specific cell

    Hi, I am trying to run a macro when I enter specific text into a specific cell. as you will see I am a complete novice at this, any help would be gratefully received.


    This is what I have tried, amongst other things, without any success.

    Please Login or Register  to view this content.
    Best Regards

    DeeK
    Last edited by deek; 08-02-2014 at 10:09 AM. Reason: Added Code tags

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: running a macro when specific text is entered into a specific cell

    Hi, deek,

    you would need to wrap your procedure with code-tags acording to Forum Rule #3 in order to get suggestions to your issue.

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: running a macro when specific text is entered into a specific cell

    Hi, deek,

    the event you presented in the opening post is for moving the mouse and activating different cells in a sheet. If the event is to enter or edit a cell the Worksheet_Change-event is the one to use.

    Please Login or Register  to view this content.
    Ciao,
    Holger

  4. #4
    Registered User
    Join Date
    04-20-2014
    Location
    Derby
    MS-Off Ver
    Excel 2010
    Posts
    59

    Re: running a macro when specific text is entered into a specific cell

    Apologies, I see how easy it is to read now

    Quote Originally Posted by deek View Post
    Hi, I am trying to run a macro when I enter specific text into a specific cell. as you will see I am a complete novice at this, any help would be gratefully received.


    This is what I have tried, amongst other things, without any success.

    Please Login or Register  to view this content.
    Best Regards

    DeeK

  5. #5
    Registered User
    Join Date
    04-20-2014
    Location
    Derby
    MS-Off Ver
    Excel 2010
    Posts
    59

    Re: running a macro when specific text is entered into a specific cell

    Hi Ciao Holger,

    I have copied your suggestion into the VBA sheet, having opened it by right clicking on the tab, and viewing the code. but when I type BLAH in to F7, the macro "Macro1" doesn't run, I have also tried with the code in the module, with no effect.

    do you have any suggestions please.

    DeeK

  6. #6
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: running a macro when specific text is entered into a specific cell

    Hi, deek,

    maybe have a look at the workbook attached and test the code in there (it works for me with Win7 and Excel2007).

    Ciao,
    Holger
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    04-20-2014
    Location
    Derby
    MS-Off Ver
    Excel 2010
    Posts
    59

    Re: running a macro when specific text is entered into a specific cell

    Ciao,

    Many thanks, this worked.

    Regards

    DeeK

+ 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. [SOLVED] VBA Macro To Clear Cell When Specific Text Is Entered
    By paulm99 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-14-2014, 06:52 PM
  2. [SOLVED] how to stop Command button If specific number is entered in a specific cell range
    By sspreyer in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-26-2013, 05:10 AM
  3. Macro to copy specific line from text file and paste into specific cell in excel
    By keeneye in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-05-2013, 10:35 AM
  4. Replies: 4
    Last Post: 11-26-2012, 05:21 AM
  5. Display msgbox when specific text entered in specific range
    By Ali_Riza in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-20-2012, 08:05 AM

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