Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Greater than, less than statement
I have a nested if statement, I am trying to write, if a1 greater than 500
but less than 999, then do X. I cant seem to get that part to work. Any Ideas ??? Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Greater than, less than statement
give this a try
Sub test() Dim ws As Worksheet Set ws = Worksheets("Sheet1") If ws.Range("A1") 500 And ws.Range("A1") < 999 Then MsgBox "ok" Else MsgBox "not ok" End If End Sub -- Gary "DP7" wrote in message ... I have a nested if statement, I am trying to write, if a1 greater than 500 but less than 999, then do X. I can't seem to get that part to work. Any Ideas ??? Thanks |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Greater than, less than statement
If x 500 And x < 999 Then
MsgBox ("IN THERE") End If -- Gary's Student gsnu200706 "DP7" wrote: I have a nested if statement, I am trying to write, if a1 greater than 500 but less than 999, then do X. I cant seem to get that part to work. Any Ideas ??? Thanks |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Greater than, less than statement
=if(and(a1500,a1<999),"X","Y")
But doing something is beyond what formulas can do. DP7 wrote: I have a nested if statement, I am trying to write, if a1 greater than 500 but less than 999, then do X. I cant seem to get that part to work. Any Ideas ??? Thanks -- Dave Peterson |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Greater than, less than statement
Are you trying to do these two calculations together or separate?
if A1500 and A1 <999 then do X works for me, but 500<A1<999 doesn't. "DP7" wrote in message ... I have a nested if statement, I am trying to write, if a1 greater than 500 but less than 999, then do X. I can't seem to get that part to work. Any Ideas ??? Thanks |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Greater than, less than statement
Oopsie!
This is a programming newsgroup question. Sorry. Dave Peterson wrote: =if(and(a1500,a1<999),"X","Y") But doing something is beyond what formulas can do. DP7 wrote: I have a nested if statement, I am trying to write, if a1 greater than 500 but less than 999, then do X. I cant seem to get that part to work. Any Ideas ??? Thanks -- Dave Peterson -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Greater Than 24 But Less Than 48 - If Statement | Excel Worksheet Functions | |||
Using IF statement to evaluate Greater or Less than Conditions | Excel Discussion (Misc queries) | |||
Greater Than/Less Than Question (IF statement?) | Excel Worksheet Functions | |||
IF STATEMENT, GREATER THEN 0 ADD ANOTHER CELLS AMOUNT | Excel Worksheet Functions | |||
Nested If statement to find greater than but less than numbers | Excel Worksheet Functions |