Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Calculation
Under the condition, if
A1=0 and A2 = 1-1/2, then B1 = Good A1=0 and A2 = 2-3/4, then B1 = Excellent A1=0 and A2 2-3/4, then B1 = Superb A3=0 and A4 = 1-1/2, then B3 = Good A3=0 and A4 = 2-3/4, then B3= Excellent A3=0 and A4 2-3/4, then B3= Superb, and so on€¦ I would like to do it by VBA, could someone please help. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Calculation
One way:
Dim rCell As Range For Each rCell In Range("A1,A3") With rCell If .Value = 0 Then Select Case .Offset(1, 0).Value Case Is = 1.5 .Offset(0, 1).Value = "Good" Case Is = 2.75 .Offset(0, 1).Value = "Excellent" Case Is 2.75 .Offset(0, 1).Value = "Superb" Case Else .Offset(0, 1).ClearContents End Select End If End With Next rCell In article , AlanW wrote: Under the condition, if A1=0 and A2 = 1-1/2, then B1 = Good A1=0 and A2 = 2-3/4, then B1 = Excellent A1=0 and A2 2-3/4, then B1 = Superb A3=0 and A4 = 1-1/2, then B3 = Good A3=0 and A4 = 2-3/4, then B3= Excellent A3=0 and A4 2-3/4, then B3= Superb, and so on€¦ I would like to do it by VBA, could someone please help. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Calculation | Excel Discussion (Misc queries) | |||
Age calculation | Excel Discussion (Misc queries) | |||
calculation | Excel Discussion (Misc queries) | |||
How do I use a rounded calculation result in another calculation? | Excel Worksheet Functions | |||
How do I use a rounded calculation result in another calculation? | Excel Worksheet Functions |