+ Reply to Thread
Results 1 to 3 of 3

Macro code to check data is entered in cell ‘A2’ before running macro

  1. #1
    Forum Contributor
    Join Date
    02-09-2004
    Location
    Cardiff - Wales - UK
    MS-Off Ver
    2013
    Posts
    475

    Question Macro code to check data is entered in cell ‘A2’ before running macro

    Hi,

    Can anyone please advise me of the macro code I need to add to my existing code to only run the macro if there is data in cell ‘A2’ on my ‘Input Data’ worksheet?

    If there is no data entered in ‘A2’ a message should be displayed i.e. “Please check you have entered data in the Input Data’ worksheet”

    Many thanks in advance for any assistance received

    Regards


    Rob
    Rob

  2. #2
    Registered User
    Join Date
    06-21-2013
    Location
    Wiltshire, UK
    MS-Off Ver
    365 Version 2210 Build 16.0.15726.20070
    Posts
    72

    Re: Macro code to check data is entered in cell ‘A2’ before running macro

    just add the below at the start of your existing code,

    Please Login or Register  to view this content.
    Isskint, i get satisfaction out of helping others

  3. #3
    Forum Contributor
    Join Date
    02-09-2004
    Location
    Cardiff - Wales - UK
    MS-Off Ver
    2013
    Posts
    475

    Re: Macro code to check data is entered in cell ‘A2’ before running macro

    isskint,

    EXCELLENT !! Just what I wanted.


    Many thanks


    Regards

    Rob

+ 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] Amend code to check cell A2 has data in before running
    By robertguy in forum Excel General
    Replies: 2
    Last Post: 12-11-2016, 09:13 AM
  2. Check Cell value before running macro
    By jonathann3891 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-02-2015, 11:54 AM
  3. Running a Macro upon data entered into cell
    By nalgene5622 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-18-2012, 12:18 AM
  4. VBA Code to check cell before running macro
    By kolovel in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-17-2010, 06:19 PM
  5. Running a macro if any data is entered in a range of cells
    By Jonathan in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-16-2005, 04:45 PM
  6. How to check a cell for content before running macro.
    By Incoherent in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-07-2005, 12:05 PM
  7. Check cell for data before running code
    By Pat in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-12-2005, 05:06 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