Excel中如何编写下图中的宏

如题所述

sub 折扣后单价()

for i=2 to cells(65536,1).end(xlup).row
if cells(i,1)<500 then
cells(i,2)=0.95*100
elseif cells(i,1)<600 then
cells(i,2)=0.9*100
elseif cells(i,1)<1000 then
cells(i,2)=0.8*100
elseif cells(i,1)<5000 then
cells(i,2)=0.7*100
else
cells(i,2)=0.6*100
end if
next
end sub
温馨提示:答案为网友推荐,仅供参考
第1个回答  2018-04-25
这个公式就行,不需要宏吧?
相似回答