+ Reply to Thread
Results 1 to 3 of 3

Message box if values in column are less or equal to 0

Hybrid View

  1. #1
    Registered User
    Join Date
    06-11-2012
    Location
    Virginia, USA
    MS-Off Ver
    Excel 2007
    Posts
    8

    Message box if values in column are less or equal to 0

    Hi,

    I have a column (O4:O46) of values that updates automatically according to a formula. When any of these values are less than or equal to zero, I would like for a message box (vbOKOnly) to pop up reading "Updates are available.


    Any help would be greatly appreciated.

    Thank you!

  2. #2
    Forum Contributor
    Join Date
    06-07-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    189

    Re: Message box if values in column are less or equal to 0

    Try this: right click the sheet tab, select View Code and paste in

    Private Sub Worksheet_Calculate()
    Dim c As Range
    For Each c In Range("O4:O46")
        If c.Value <= 0 Then MsgBox "Updates are available", vbInformation
    Next c
    End Sub

  3. #3
    Registered User
    Join Date
    06-11-2012
    Location
    Virginia, USA
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Message box if values in column are less or equal to 0

    Works perfectly. Thank you so much for the fast response!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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