+ Reply to Thread
Results 1 to 2 of 2

Error message if there is a certain statement in a cell

  1. #1
    Registered User
    Join Date
    09-20-2014
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    16

    Question Error message if there is a certain statement in a cell

    Sorry if this is basic. I'm new to Excel.



    I have some text in a cell which says 'Insert statement here'. If this is not removed and replaced with a statement I want an error message to show up. I want this to happen when I press a button (so in a macro).

    How would I do this?



    Many thanks

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Error message if there is a certain statement in a cell

    You could use Conditional formatting for this.

    Assuming that your text is in A2 then in CF rules use this.

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Choose Colour.OK.

    How can you use Conditional Formating.

    --In Excel 2007 and 2010, Conditional Formatting is in the Styles group on the Home tab. In Excel 2003, Conditional Formatting is on the Format menu. See here how you can work using CF.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

+ 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] If cell is 0 then Error message needs to pop up
    By nenadmail in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-11-2012, 12:29 PM
  2. Error message in if statement - reg
    By mvel_sky in forum Excel General
    Replies: 2
    Last Post: 04-25-2012, 08:49 AM
  3. Using a Boolean function within an If statement: Argument not optional error message
    By elfsprin in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-16-2011, 04:12 PM
  4. Error Message In Cell
    By Kearcomm in forum Excel General
    Replies: 3
    Last Post: 03-19-2006, 11:30 AM
  5. Why does this statement give an error message?
    By George Furnell in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-18-2006, 10:50 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