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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default 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??


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
Sorting numbers the common sense way excell03 dlaplant Excel Discussion (Misc queries) 4 August 17th 09 06:30 PM
Linear Trendline Vs Common Sense Douglas Eckert Charts and Charting in Excel 6 June 8th 07 04:54 PM
Arranging information so a chart makes sense Scott Shields Charts and Charting in Excel 0 October 10th 06 05:26 PM
Converting a date from nonsense to sense RobertM Excel Discussion (Misc queries) 1 April 24th 06 02:21 PM
Does this make sense? Tom Excel Programming 0 August 24th 04 06:24 PM


All times are GMT +1. The time now is 06:46 PM.

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

About Us

"It's about Microsoft Excel"