首先感谢TonyDeng的帮助。
  kz = 6
  Do While Not (IsEmpty(Sheets("上1").Cells(kz, 1).Value))
    sn = 0
    smax = 0
    smin = 9999
    For i = 2 To 8
      If Sheets("上1").Cells(kz, i).Value > smax Then
        smax = Sheets("上1").Cells(kz, i).Value
      End If
      If Sheets("上1").Cells(kz, i).Value < smin Then
        smin = Sheets("上1").Cells(kz, i).Value
      End If
      sn = sn + Sheets("上1").Cells(kz, i).Value
    Next
    Sheets("上1").Cells(kz, 9).Value = sn - smax - smin
    Sheets("上1").Cells(kz, 10).Value = (sn - smax - smin) / 5
   
    kz = kz + 1
  Loop
未染红的几行是用来求7个评委打分去掉最高分和高低分后的总分和平均分的代码。
以上染红的几行是我在EXCEL中的VBA里判断数据的依据,如何转换成VFP中能用的?