Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
SG
 
Posts: n/a
Default Message box if cell is greater than less than 0 [Zero]

Can someone help me with a code that can display a message box if a cell is
greater than less than 0 [Zero]

I have a column with each cell containing the following...

=SUM(C2:W2)
=SUM(C3:W3)
=SUM(C4:W4)
=SUM(C5:W5)
and so on

At the end of the day I have to scroll over and look down the column to see
if anything other than zero is there. If it is I have to go back and correct
my typo mistakes.

I need VB code when I enter data into cells that will alert me right then so
I can make the change I need.

All the best,

SG


  #2   Report Post  
Posted to microsoft.public.excel.misc
JimMay
 
Posts: n/a
Default Message box if cell is greater than less than 0 [Zero]

Not sure of your situation, but I often (in what you describe) do a
Window-Freeze (freezing the First 4 or 5 rows (1:5) and in certain
columns capture
Info that is "going-on" down below.. For example in Cell F1 enter:
=Sum(M:M), where M is your formula column,, If F1 has a value **other
than zero** - I have a problem.
What do you think?
An alternative before continuing into code
HTH

"SG" wrote in message
:

Can someone help me with a code that can display a message box if a cell is
greater than less than 0 [Zero]

I have a column with each cell containing the following...

=SUM(C2:W2)
=SUM(C3:W3)
=SUM(C4:W4)
=SUM(C5:W5)
and so on

At the end of the day I have to scroll over and look down the column to see
if anything other than zero is there. If it is I have to go back and correct
my typo mistakes.

I need VB code when I enter data into cells that will alert me right then so
I can make the change I need.

All the best,

SG


  #3   Report Post  
Posted to microsoft.public.excel.misc
SG
 
Posts: n/a
Default Message box if cell is greater than less than 0 [Zero]

Hi Jim,

Not really what I need.
I use the Data Form to help cut down on all the scrolling. Each sheet I have
and there are many, are quit large and for my use I feel a message box would
better suite my needs. To give you an idea what I'm doing is, lets say in
Column C all cells have a negative number...Example ($50.00) now I enter in
that same amount in a different Column and this could be many Columns over
out of site of the page. If I make a mistake on the amount I put in then
this is where I need to know right away.



All the best,
SG

"JimMay" wrote in message
news:rJI9g.29024$fG3.4694@dukeread09...
Not sure of your situation, but I often (in what you describe) do a
Window-Freeze (freezing the First 4 or 5 rows (1:5) and in certain columns
capture
Info that is "going-on" down below.. For example in Cell F1 enter:
=Sum(M:M), where M is your formula column,, If F1 has a value **other
than zero** - I have a problem.
What do you think?
An alternative before continuing into code
HTH

"SG" wrote in message
:

Can someone help me with a code that can display a message box if a cell
is
greater than less than 0 [Zero]

I have a column with each cell containing the following...

=SUM(C2:W2)
=SUM(C3:W3)
=SUM(C4:W4)
=SUM(C5:W5)
and so on

At the end of the day I have to scroll over and look down the column to
see
if anything other than zero is there. If it is I have to go back and
correct
my typo mistakes.

I need VB code when I enter data into cells that will alert me right then
so
I can make the change I need.

All the best,

SG




  #4   Report Post  
Posted to microsoft.public.excel.misc
JimMay
 
Posts: n/a
Default Message box if cell is greater than less than 0 [Zero]

SG:
I've been trying now to understand VBA now for a couple of years,
I'm not certain that this is correct, but you might try it <<back up
Your work, please before trying The code below should be Copied and
Pasted into the "ThisWorkbook" code module of your workbook. It should
Fire (trigger) each time you make a change in cells C2:W1000 on any/all
Worksheets in the WB.

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As
Range)
Application.EnableEvents = False
Set myRng = Range("C2:W1000") ' Change if necessary
If Application.WorksheetFunction.Sum(myRng) < 0 Then
MsgBox "You are out of Balance"
End If
Set myRng = Nothing
Application.EnableEvents = True
End Sub

Let me know if this helps.
Jim May


"SG" wrote in message
:

Hi Jim,

Not really what I need.
I use the Data Form to help cut down on all the scrolling. Each sheet I have
and there are many, are quit large and for my use I feel a message box would
better suite my needs. To give you an idea what I'm doing is, lets say in
Column C all cells have a negative number...Example ($50.00) now I enter in
that same amount in a different Column and this could be many Columns over
out of site of the page. If I make a mistake on the amount I put in then
this is where I need to know right away.



All the best,
SG

"JimMay" wrote in message
news:rJI9g.29024$fG3.4694@dukeread09...
Not sure of your situation, but I often (in what you describe) do a
Window-Freeze (freezing the First 4 or 5 rows (1:5) and in certain columns
capture
Info that is "going-on" down below.. For example in Cell F1 enter:
=Sum(M:M), where M is your formula column,, If F1 has a value **other
than zero** - I have a problem.
What do you think?
An alternative before continuing into code
HTH

"SG" wrote in message
:

Can someone help me with a code that can display a message box if a cell
is
greater than less than 0 [Zero]

I have a column with each cell containing the following...

=SUM(C2:W2)
=SUM(C3:W3)
=SUM(C4:W4)
=SUM(C5:W5)
and so on

At the end of the day I have to scroll over and look down the column to
see
if anything other than zero is there. If it is I have to go back and
correct
my typo mistakes.

I need VB code when I enter data into cells that will alert me right then
so
I can make the change I need.

All the best,

SG



  #5   Report Post  
Posted to microsoft.public.excel.misc
SG
 
Posts: n/a
Default Message box if cell is greater than less than 0 [Zero]

Jim,

You nailed it my friend. Thank you so much for taking the time to help on
this one.
I did change one little thing...
MsgBox "You are out of Balance" now reads

MsgBox " Jim May says you are out of Balance" VBG :)

Thanks again,
SG

"JimMay" wrote in message
news:7MO9g.29077$fG3.11875@dukeread09...
SG:
I've been trying now to understand VBA now for a couple of years,
I'm not certain that this is correct, but you might try it <<back up
Your work, please before trying The code below should be Copied and
Pasted into the "ThisWorkbook" code module of your workbook. It should
Fire (trigger) each time you make a change in cells C2:W1000 on any/all
Worksheets in the WB.

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As
Range)
Application.EnableEvents = False
Set myRng = Range("C2:W1000") ' Change if necessary
If Application.WorksheetFunction.Sum(myRng) < 0 Then
MsgBox "You are out of Balance"
End If
Set myRng = Nothing
Application.EnableEvents = True
End Sub

Let me know if this helps.
Jim May


"SG" wrote in message
:

Hi Jim,

Not really what I need.
I use the Data Form to help cut down on all the scrolling. Each sheet I
have
and there are many, are quit large and for my use I feel a message box
would
better suite my needs. To give you an idea what I'm doing is, lets say in
Column C all cells have a negative number...Example ($50.00) now I enter
in
that same amount in a different Column and this could be many Columns
over
out of site of the page. If I make a mistake on the amount I put in then
this is where I need to know right away.



All the best,
SG

"JimMay" wrote in message
news:rJI9g.29024$fG3.4694@dukeread09...
Not sure of your situation, but I often (in what you describe) do a
Window-Freeze (freezing the First 4 or 5 rows (1:5) and in certain
columns
capture
Info that is "going-on" down below.. For example in Cell F1 enter:
=Sum(M:M), where M is your formula column,, If F1 has a value **other
than zero** - I have a problem.
What do you think?
An alternative before continuing into code
HTH

"SG" wrote in message
:

Can someone help me with a code that can display a message box if a
cell
is
greater than less than 0 [Zero]

I have a column with each cell containing the following...

=SUM(C2:W2)
=SUM(C3:W3)
=SUM(C4:W4)
=SUM(C5:W5)
and so on

At the end of the day I have to scroll over and look down the column
to
see
if anything other than zero is there. If it is I have to go back and
correct
my typo mistakes.

I need VB code when I enter data into cells that will alert me right
then
so
I can make the change I need.

All the best,

SG






  #6   Report Post  
Posted to microsoft.public.excel.misc
JimMay
 
Posts: n/a
Default Message box if cell is greater than less than 0 [Zero]

Note that I also anticipated that you might have multiple occurances of
your
Search criteria; Test it out <<carefully before "fully- adopting..
Thanks for the feedback,
Jim May

"SG" wrote in message
:

Jim,

You nailed it my friend. Thank you so much for taking the time to help on
this one.
I did change one little thing...
MsgBox "You are out of Balance" now reads

MsgBox " Jim May says you are out of Balance" VBG :)

Thanks again,
SG

"JimMay" wrote in message
news:7MO9g.29077$fG3.11875@dukeread09...
SG:
I've been trying now to understand VBA now for a couple of years,
I'm not certain that this is correct, but you might try it <<back up
Your work, please before trying The code below should be Copied and
Pasted into the "ThisWorkbook" code module of your workbook. It should
Fire (trigger) each time you make a change in cells C2:W1000 on any/all
Worksheets in the WB.

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As
Range)
Application.EnableEvents = False
Set myRng = Range("C2:W1000") ' Change if necessary
If Application.WorksheetFunction.Sum(myRng) < 0 Then
MsgBox "You are out of Balance"
End If
Set myRng = Nothing
Application.EnableEvents = True
End Sub

Let me know if this helps.
Jim May


"SG" wrote in message
:

Hi Jim,

Not really what I need.
I use the Data Form to help cut down on all the scrolling. Each sheet I
have
and there are many, are quit large and for my use I feel a message box
would
better suite my needs. To give you an idea what I'm doing is, lets say in
Column C all cells have a negative number...Example ($50.00) now I enter
in
that same amount in a different Column and this could be many Columns
over
out of site of the page. If I make a mistake on the amount I put in then
this is where I need to know right away.



All the best,
SG

"JimMay" wrote in message
news:rJI9g.29024$fG3.4694@dukeread09...
Not sure of your situation, but I often (in what you describe) do a
Window-Freeze (freezing the First 4 or 5 rows (1:5) and in certain
columns
capture
Info that is "going-on" down below.. For example in Cell F1 enter:
=Sum(M:M), where M is your formula column,, If F1 has a value **other
than zero** - I have a problem.
What do you think?
An alternative before continuing into code
HTH

"SG" wrote in message
:

Can someone help me with a code that can display a message box if a
cell
is
greater than less than 0 [Zero]

I have a column with each cell containing the following...

=SUM(C2:W2)
=SUM(C3:W3)
=SUM(C4:W4)
=SUM(C5:W5)
and so on

At the end of the day I have to scroll over and look down the column
to
see
if anything other than zero is there. If it is I have to go back and
correct
my typo mistakes.

I need VB code when I enter data into cells that will alert me right
then
so
I can make the change I need.

All the best,

SG



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
Urgent date/scheduling calc needed jct Excel Worksheet Functions 3 February 24th 06 01:36 AM
Instead of a negative number, I'd like to show zero... Dr. Darrell Excel Worksheet Functions 6 December 7th 05 08:21 PM
I want the greater number of 2 cells to show in a separate cell cfiser Excel Discussion (Misc queries) 2 November 16th 05 10:32 PM
I want the greater number of 2 cells to show in a separate cell Ron Coderre Excel Discussion (Misc queries) 1 November 16th 05 09:22 PM
Addition to Turn cell red if today is greater or equal to date in cell Rich New Users to Excel 2 December 9th 04 02:06 AM


All times are GMT +1. The time now is 12:22 AM.

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"