PDA

View Full Version : Simple Math Value question...

isaaclloyd
08-15-2005, 07:58 AM
What I am trying to figure out is how to do something like this:

If Value1 > Value2,Value3,Value4,Value5 THEN this...
else If Value2 > Value1,Value3,Value4,Value5 THEN this...
else If Value3 > Value1,Value2,Value4,Value5 THEN this...
else If Value4 > Value1,Value2,Value3,Value5 THEN this...
else If Value5 > Value1,Value2,Value3,Value4 THEN this...

Any comments or suggestions would be appreciated. Thanks.

~Isaac~

isaaclloyd
08-15-2005, 08:07 AM
fixed my own question. Thanks anyways.

<%

Dim Value1, Value2, Value3, Value4, Value5

Value1 = 111
Value2 = 5
Value3 = 30
Value4 = 2
Value5 = 100

If Value1 > Value2 AND Value1 > Value3 AND Value1 > Value4 AND Value1 > Value5 Then
Response.Write "VALUE1"

ElseIf Value2 > Value1 AND Value2 > Value3 AND Value2 > Value4 AND Value2 > Value5 Then
Response.Write "VALUE2"

ElseIf Value3 > Value1 AND Value3 > Value2 AND Value3 > Value4 AND Value3 > Value5 Then
Response.Write "VALUE3"

ElseIf Value4 > Value1 AND Value4 > Value2 AND Value4 > Value3 AND Value4 > Value5 Then
Response.Write "VALUE4"

ElseIf Value5 > Value1 AND Value5 > Value2 AND Value5 > Value3 AND Value5 > Value4 Then
Response.Write "VALUE5"

Else

END IF

%>

~Isaac~