Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Warning Messages fabio Excel Worksheet Functions 3 October 15th 08 10:54 AM
Excel hyperlinks - disabling warning messages Larry Links and Linking in Excel 1 July 29th 07 02:22 AM
Not getting messages in OE Biff Excel Worksheet Functions 2 November 1st 06 08:01 AM
How to prevent warning messages on protected work sheet. Dannycol Excel Worksheet Functions 3 April 5th 06 09:07 PM
Msg.box -messages TUNGANA KURMA RAJU Excel Discussion (Misc queries) 4 January 6th 06 04:33 AM


All times are GMT +1. The time now is 08:04 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"