![]() |
how to sense -1 value at any cell in a column
hi guys i have a column like that a 1 22 341 42 5 and each time i add more number to it how to sense after i type the number is it -1 or not?? i mean if i write -1 and then i press enter or change the active cel ,if there is a way to check what i just wrote and see if it -1 or not? -- amrezza ----------------------------------------------------------------------- amrezzat's Profile: http://www.excelforum.com/member.php...fo&userid=2876 View this thread: http://www.excelforum.com/showthread.php?threadid=53957 |
how to sense -1 value at any cell in a column
right click sheet tabview codeinsert this
Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column < 1 Then Exit Sub If Target < 1 Then MsgBox "less than one" End Sub -- Don Guillett SalesAid Software "amrezzat" wrote in message ... hi guys i have a column like that a 1 22 341 42 5 and each time i add more number to it how to sense after i type the number is it -1 or not?? i mean if i write -1 and then i press enter or change the active cell ,if there is a way to check what i just wrote and see if it -1 or not?? -- amrezzat ------------------------------------------------------------------------ amrezzat's Profile: http://www.excelforum.com/member.php...o&userid=28766 View this thread: http://www.excelforum.com/showthread...hreadid=539573 |
how to sense -1 value at any cell in a column
If you write down in column A, try this:
Private Sub Worksheet_Change(ByVal Target As Range) If Not Application.Intersect(Columns("A:A"), Target) Is Nothing Then If Target.Value < -1 Then MsgBox "there is < -1" Else MsgBox "there is = -1" End If End If End Sub Kind Regards, Andrzej amrezzat napisał(a): hi guys i have a column like that a 1 22 341 42 5 and each time i add more number to it how to sense after i type the number is it -1 or not?? i mean if i write -1 and then i press enter or change the active cell ,if there is a way to check what i just wrote and see if it -1 or not?? |
All times are GMT +1. The time now is 01:23 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com