成績 Ach%
X>=97 120%
93<=X<97 100%
89<=X<93 80%
85<=X<89 60%
81<=X<85 40%
77<=X<81 20%
X<77 0%
依據上述條件,有高手可以幫忙簡化公式寫法嗎?拜託拜託感謝~~~
If X >= 97% then ach=120%
Else If X >=93% then ach=100%
Else if X >=89% then ach=80%
Else If X >=85% then ach =60%
Else if X >= 81% then ach=40%
Else If X>=77% then ach =20%
Else ach=0%