以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  if问题  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=112786)

--  作者:jick0526
--  发布时间:2018/1/2 21:57:00
--  if问题
老师,请问下,如果B列小于等于A列,那么C列等于B列+6-A列,否则C列等于B列-A列,代码要怎么写,谢谢!
--  作者:有点蓝
--  发布时间:2018/1/2 22:03:00
--  
If e.DataRow("B列") <= e.DataRow("A列") Then
    e.DataRow("C列")=e.DataRow("B列")+6-e.DataRow("A列")
Else
    e.DataRow("C列")=e.DataRow("B列")-e.DataRow("A列")
End If