Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If you need only to determine whether there exists a value greater
than zero but do not need to get the actual location of that value, use Sub AAA() Dim R As Range With Worksheets("Sheet1") Set R = Range(.Cells(1, "A"), _ .Cells(.Rows.Count, "A").End(xlUp)) End With If Application.Sum(R.Value) 0 Then MsgBox "Past Due" End If End Sub If you do need to determine where the non-zero value occurs, use Sub BBB() Dim RR As Range Dim R As Range With Worksheets("Sheet1") Set RR = Range(.Cells(1, "A"), _ .Cells(.Rows.Count, "A").End(xlUp)) End With For Each R In RR.Cells If IsNumeric(R.Value) Then If R.Value 0 Then Application.Goto R, True MsgBox "Past Due" Exit For End If End If Next R End Sub Cordially, Chip Pearson Microsoft Most Valuable Professional Excel Product Group, 1998 - 2009 Pearson Software Consulting, LLC www.cpearson.com (email on web site) On Wed, 18 Feb 2009 10:57:01 -0800, Jimjai wrote: Hi, I would like to create a macro button that loops thru a column, if any values on that column is greater than 0 then pop the message saying "pass due" Thanks Jimmy |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
fields names do not show in excel 2007 pivot table fields list | New Users to Excel | |||
comparing 2 fields/cells and displaying a message programitcally | Excel Programming | |||
Excel SHOULD NOT AUTO-CHANGE formated text fields to DATE FIELDS! | Excel Worksheet Functions | |||
Replace Excel Message w/Custom Message | Excel Programming | |||
Fix too few data fields error message when merging excel and word | Excel Discussion (Misc queries) |