Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Need help on IF condition
I have been researching on if condition, but unable to get it work,
I have to write a IF comnditon for the folowing, Dollars Points $3.0 1 $4.0 2 $5.0 3 $6.0 4 $7.0 5 $8.0 6 $9.0 7 $10.0 8 If $ value is =3 then 1 if $ value is =3.5 and <4 then 2 iif $ value is =4.5 and <5 then 3 like wise, If not possible with IF condition, please let me know for alternative formule, please help |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Need help on IF condition
What happens between 4 and 4.5?
One way, if I understand you correctly: =ROUND(A1,0) - 2 In article .com, wrote: I have been researching on if condition, but unable to get it work, I have to write a IF comnditon for the folowing, Dollars Points $3.0 1 $4.0 2 $5.0 3 $6.0 4 $7.0 5 $8.0 6 $9.0 7 $10.0 8 If $ value is =3 then 1 if $ value is =3.5 and <4 then 2 iif $ value is =4.5 and <5 then 3 like wise, If not possible with IF condition, please let me know for alternative formule, please help |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Need help on IF condition
You can use select case (adjust case clauses )
Dim Dollars As Currency Dim Points As Integer Dollars = 7.3 Select Case Dollars Case 0.1 To 3.5 Points = 1 Case 3.6 To 4.5 Points = 2 Case 4.6 To 5.5 Points = 3 Case 5.6 To 6.5 Points = 4 Case 6.6 To 7.5 Points = 5 Case 7.6 To 8.5 Points = 6 Case 8.6 To 9.5 Points = 7 Case 9.6 To 10 Points = 8 Case Else Points = 0 End Select MsgBox Points -- urkec " wrote: I have been researching on if condition, but unable to get it work, I have to write a IF comnditon for the folowing, Dollars Points $3.0 1 $4.0 2 $5.0 3 $6.0 4 $7.0 5 $8.0 6 $9.0 7 $10.0 8 If $ value is =3 then 1 if $ value is =3.5 and <4 then 2 iif $ value is =4.5 and <5 then 3 like wise, If not possible with IF condition, please let me know for alternative formule, please help |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to SUM on a condition? | Excel Worksheet Functions | |||
lookup with multiple condition, but one condition to satisfy is en | Excel Worksheet Functions | |||
Combine an OR condition with an AND condition | Excel Discussion (Misc queries) | |||
Condition 1 overules condition 2? | Excel Worksheet Functions | |||
I need 4 condition for condition formatting | Excel Programming |