看板 Office 關於我們 聯絡資訊
大大又來請教 以下程式判斷>2 照理說應該文字要算n 但實際跑y 可以幫忙解惑嗎?是要用其他函數嗎? 謝謝喔 https://i.imgur.com/2n1sFfq.jpg Sub test() If Range("A" & ActiveCell.Row) > 2 Then Range("B" & ActiveCell.Row) = "y" Else Range("B" & ActiveCell.Row) = "n" End If End Sub -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 101.12.0.92 (臺灣) ※ 文章網址: https://www.ptt.cc/bbs/Office/M.1577438579.A.42E.html ※ 編輯: tina1688 (101.12.0.92 臺灣), 12/27/2019 17:24:15
soyoso: 加個判斷isnumeric 12/27 17:32
soyoso: ... > 2 and isnumeric(range("a" &....)) 12/27 17:38
tina1688: 感謝感謝感謝!!!!S大大!!!!!!!!!!! 12/27 17:45