how to get a warning when data is entered wrongly
On Tuesday, October 16, 2012 10:30:23 AM UTC-7, sumesh56 wrote:
i have a spreadsheet. The ENTRY and EXIT should tally.
ENTRY----total of col A:D is in E2.
EXIT---- total of col G:J is in K2.
Cell K is formatted as E2=K2
cell K2 is formatted as the sum of G:J
when i enter a data wrongly in anywhere between the cells G:J a warning
should come in col K2(of course after entering in all the four cells
G:J).the idea is the number in entry should tally with that of the exit.
is it possible?
the excel file is attached.
+-------------------------------------------------------------------+
|Filename: entry and exit.zip |
|Download: http://www.excelbanter.com/attachment.php?attachmentid=626|
+-------------------------------------------------------------------+
--
sumesh56
See if this does what you want.
Copy into the sheet module.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim I As Integer, J As Integer
I = Range("E3")
J = Range("K3")
If I < J Then
MsgBox "E Does Not Equal K"
End If
End Sub
Regards,
Howard
|