Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Help please - warning messages
I am trying to put a warning message on cell that will pop up if the value of
that cell is not the same as the value of another cell. (using data validation). My problem is that the cell I am trying to put the warning on has a vlookup formula in it and therefore the warning message does not work. Is there a way to do this? Please help!! Thanks, Angela |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Help please - warning messages
adickson;355328 Wrote: I am trying to put a warning message on cell that will pop up if the value of that cell is not the same as the value of another cell. (using data validation). My problem is that the cell I am trying to put the warning on has a vlookup formula in it and therefore the warning message does not work. Is there a way to do this? Please help!! Thanks, AngelaYou can use this code in the worksheet code module, you could use something similar to the body of the code for the worksheet calculate if need be: Code: -------------------- Private Sub Worksheet_Change(ByVal Target As Range) Dim pC As String 'remember our cell pC = Target.Address 'the cell we are checking the value in If Target.Address < "$A$1" Then Exit Sub ' the cell we are checking against If Target.Value < Me.Range("B1").Value Then 'show a message MsgBox "The value of cell " & Target.Address & " is different from B1", vbInformation, "Unequal Value Found!" 'go back to our cell we checked Range(pC).Select End If End Sub -------------------- -- Simon Lloyd Regards, Simon Lloyd 'The Code Cage' (http://www.thecodecage.com) ------------------------------------------------------------------------ Simon Lloyd's Profile: http://www.thecodecage.com/forumz/member.php?userid=1 View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=99714 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Warning Messages | Excel Worksheet Functions | |||
Excel hyperlinks - disabling warning messages | Links and Linking in Excel | |||
Not getting messages in OE | Excel Worksheet Functions | |||
How to prevent warning messages on protected work sheet. | Excel Worksheet Functions | |||
Msg.box -messages | Excel Discussion (Misc queries) |