+ Reply to Thread
Results 1 to 6 of 6

Prompt if statement

  1. #1
    Registered User
    Join Date
    12-07-2010
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    13

    Prompt if statement

    Hi,

    I want to be able to run a continuous piece of code that is cell h5 is greater than h4 a prompt is shown.

    h4 is constant however h5 takes values from other cells so using data validation does not work as if does not refresh every time new data is entered.

    All I need is something like if h5>h4 then prompt... else nothing but I have no experience on VBA.

    Thanks,
    Ali
    Last edited by Aliw267; 01-05-2011 at 12:39 PM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Prompt if statement

    Can't you use Conditional Formatting?
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    12-07-2010
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Prompt if statement

    Conditional formatting will only allow me to change the format of the cell, I want a prompt to come up on the screen warning the user that the data entered takes the value of the cell over the allowed value.

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Prompt if statement

    Quote Originally Posted by Aliw267 View Post
    Conditional formatting will only allow me to change the format of the cell, I want a prompt to come up on the screen warning the user that the data entered takes the value of the cell over the allowed value.

    Which would only work if the user enabled macros, so you would need to ensure that this happens

    A warning message would interrupt any calculating, macros etc until OK is pressed.

    Please Login or Register  to view this content.
    Last edited by royUK; 01-05-2011 at 09:08 AM.

  5. #5
    Registered User
    Join Date
    12-07-2010
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Prompt if statement

    Thanks for this.

  6. #6
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Prompt if statement

    No problem

+ 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