10-18-2022, 07:13 PM
Try this, instead.
Demo
Pete
Demo
Code: (Select All)
DataBaseValue$ = "7,3,9,4,2,6,2,8"
FOR i = 0 TO 7
DataBaseValue = VAL(MID$(DataBaseValue$, i * 2 + 1, 1))
FOR j = 0 TO 7
DataBaseValue = VAL(MID$(DataBaseValue$, j * 2 + 1, 1))
IF i <> j THEN
IF DataBaseValue > HL THEN SWAP HL, DataBaseValue ELSE low = DataBaseValue
'Low = (_ROUND(Low * 100000)) / 100000
'HL = (_ROUND(HL * 100000)) / 100000
END IF
NEXT
NEXT
PRINT "Low ="; low, "High ="; HL
Pete