Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Visual Code to make sure value is greater than 0
I am trying to use a visual statement to make sure a value in an active cell
is greater than 0 and am not able to do it properly. This cell has a value that comes from another cell. Below is the code I am looking at. If ActiveCell.Address < "0" Then Thanks |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Visual Code to make sure value is greater than 0
On Oct 28, 10:21*am, Jeremy wrote:
I am trying to use a visual statement to make sure a value in an active cell is greater than 0 and am not able to do it properly. *This cell has a value that comes from another cell. *Below is the code I am looking at. If ActiveCell.Address < "0" Then Thanks Get rid of the quotes around 0 or use selection < 0 or selection.value < "". All are options. It is best if you can refer to the range instead of selcting a cell though. If Range("A2") < "" Then. This peeds up your code. Jay |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Visual Code to make sure value is greater than 0
On Oct 28, 10:21*am, Jeremy wrote:
I am trying to use a visual statement to make sure a value in an active cell is greater than 0 and am not able to do it properly. *This cell has a value that comes from another cell. *Below is the code I am looking at. If ActiveCell.Address < "0" Then Thanks i forgot to add this part. ActiveCell.Address returns the cell address like A2 B9 so forth. This woudl never be 0. You could use ActiveCell.Value. Jay |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Visual Code to make sure value is greater than 0
Hi,
you can use conditional formating to highlight the cell if the value is less than 0, in excel 2007, home, conditional formating, Highlight cells rules, Less than, choose 0 and then choose the color "Jeremy" wrote: I am trying to use a visual statement to make sure a value in an active cell is greater than 0 and am not able to do it properly. This cell has a value that comes from another cell. Below is the code I am looking at. If ActiveCell.Address < "0" Then Thanks |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
Visual Code to make sure value is greater than 0
I am not able to use conditional formating on what I am looking for. There
is more visual statement I am using to do what I am looking for. If the value is 0 I don't want it to execute my next step in visual. "Eduardo" wrote: Hi, you can use conditional formating to highlight the cell if the value is less than 0, in excel 2007, home, conditional formating, Highlight cells rules, Less than, choose 0 and then choose the color "Jeremy" wrote: I am trying to use a visual statement to make sure a value in an active cell is greater than 0 and am not able to do it properly. This cell has a value that comes from another cell. Below is the code I am looking at. If ActiveCell.Address < "0" Then Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Visual Basic Code hidden | Excel Discussion (Misc queries) | |||
repeating code in visual basic | Excel Discussion (Misc queries) | |||
Visual Basic code | Excel Discussion (Misc queries) | |||
I need a visual basic code....please | Excel Discussion (Misc queries) | |||
How do I protect Visual Basic for Application Code | New Users to Excel |