excel如何在設定值範圍顯示ok
來源:魅力女性吧 6.08K
sub pd()'模塊名
dim rng as range, p as integer, q as integer
p=80'設定範圍下限值
q=90'設定範圍上限值
for each rng in selection'遍歷
if e>=p and e≤q then'判斷範圍
msgbox(4ok")'若符合條件,則彈出窗體信息"ok"
end if
next
end sub
sheet頁選定數據,vba窗口運行按鈕(或按鍵盤上的F8)