Board logo

標題: 巨集無法錄製 [打印本頁]

作者: tinching    時間: 2011-3-23 19:01     標題: 巨集無法錄製

=IF((MID(H49,1,1)="-"),M49*10000-$G$46*10000,IF((MID(H49,1,1)>"0"),$G$46*10000-M49*10000,IF((MID(I49,1,1)="-"),M49*10000-$I$46*10000,IF((MID(I49,1,1)>"0"),$I$46*10000-M49*10000,IF((MID(J49,1,1)="-"),$K$46*100-M49*100,IF((MID(J49,1,1)>"0"),M49*100-$K$46*100,""))))))

各位好:
        小弟想將以上函數錄成巨集執行,但出現「太複習,無法錄製。」,請各位指教!謝謝!
作者: Hsieh    時間: 2011-4-9 00:01

回復 1# tinching
用chr(34)把"取代
例如在H1輸入此公式
[H1] = "=IF((MID(H49,1,1)=" & Chr(34) & "-" & Chr(34) & "),M49*10000-$G$46*10000,IF((MID(H49,1,1)>" & Chr(34) & "0" & Chr(34) & "),$G$46*10000-M49*10000,IF((MID(I49,1,1)=" & Chr(34) & "-" & Chr(34) & "),M49*10000-$I$46*10000,IF((MID(I49,1,1)>" & Chr(34) & "0" & Chr(34) & "),$I$46*10000-M49*10000,IF((MID(J49,1,1)=" & Chr(34) & "-" & Chr(34) & "),$K$46*100-M49*100,IF((MID(J49,1,1)>" & Chr(34) & "0" & Chr(34) & "),M49*100-$K$46*100," & Chr(34) & "" & Chr(34) & "))))))"




歡迎光臨 麻辣家族討論版版 (http://forum.twbts.com/)