Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Urgent date/scheduling calc needed | Excel Worksheet Functions | |||
Instead of a negative number, I'd like to show zero... | Excel Worksheet Functions | |||
I want the greater number of 2 cells to show in a separate cell | Excel Discussion (Misc queries) | |||
I want the greater number of 2 cells to show in a separate cell | Excel Discussion (Misc queries) | |||
Addition to Turn cell red if today is greater or equal to date in cell | New Users to Excel |