View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
mangesh_yadav[_348_] mangesh_yadav[_348_] is offline
external usenet poster
 
Posts: 1
Default using an if then statement call a caption box to a cell


Hi,

Since you posted this in the programming section, and since you had not
given any more details....

Assuming that you enter your input in cells A1 and A2, And cell B2 is
the one which you want to check, you could have enter the following
code in the module of the concerned sheet. Right click on the tab which
holds the sheet name, click view code, and enter the following code:


Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" Or Target.Address = "$A$2" Then
If Range("B2") = 100 Then
MsgBox ("Goal value reached")
End If
End If
End Sub


Mangesh


--
mangesh_yadav
------------------------------------------------------------------------
mangesh_yadav's Profile: http://www.excelforum.com/member.php...o&userid=10470
View this thread: http://www.excelforum.com/showthread...hreadid=379571