Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Select the sheet tab which you want to work with. Right click the sheet tab
and click on 'View Code'. This will launch VBE. Paste the below code to the right blank portion. Get back to to workbook and try out. 'If only in Row6 Private Sub Worksheet_Change(ByVal Target As Range) If Not Application.Intersect(Target, Range("A6,G6,H6,K6")) Is Nothing Then If Range("A6") = "ADO" Then If Range("G6") < Range("H6") And Range("H6") < Range("K6") Then MsgBox "Code ADO has reached criteria" End If End If End If End Sub 'OR if you want this to work on all rows Private Sub Worksheet_Change(ByVal Target As Range) If Range("A" & Target.Row) = "ADO" Then If Range("G" & Target.Row) < Range("H" & Target.Row) And _ Range("H" & Target.Row) < Range("K" & Target.Row) Then MsgBox "Code ADO has reached criteria" End If End If End Sub -- Jacob "Rob" wrote: Hi, I would like a message box to display if the following conditions are met. Assuming column A contains codes that do not change . For example the code in column A6 is ADO and the value in G6 is less than the value in H6 which is less than the value in K6. A message box comes up with €śCode ADO has reached criteria€ť. Being a complete newbie at VBA I would really appreciate some help. Thankyou. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
show a message if print | Excel Discussion (Misc queries) | |||
Do not show this message again | Excel Programming | |||
Cannot get message box to show | Excel Programming | |||
message box does not show | Excel Discussion (Misc queries) | |||
show message | Excel Programming |