用得好复杂,容易错,倒不如用自定义函数public function rmbb(m) y = int(abs(m)) j = round(abs(m) - y, 2) f = (j * 10 - int(j * 10)) / 10 a = application.text(y, "[dbnum2]") d = "元" if j < 0.1 then e = "" else e = "角" if f < 0.01 then g = "整" else g = "分" if f < 0.01 then c = "" else c = application.text(round(f * 100, 0), "[dbnum2]") if j = 0 then b = "" else b = application.text(int(j * 10), "[dbnum2]") if m < 0 then z = "负" else z = "" rmbb = z & a & d & b & e & c & gend function 20210311