EXCEL VBA删除重复(宏一)与不重复内容(宏二),求这二宏
发布网友
发布时间:2022-05-27 09:48
我来回答
共1个回答
热心网友
时间:2023-10-15 13:00
publict sub 宏一()
dim rng as range,cel as range
dim f as worksheetfunction
set f = worksheetfunction
set rng = sheets("核对表").range("C5:F9")
for each cel in rng
if f.countif(rng,cel)>1 and cel <>"" then
cel = ""
end if
next
end sub
publict sub 宏二()
dim rng as range,cel as range
dim f as worksheetfunction
set f = worksheetfunction
set rng = sheets("核对表").range("C5:F9")
for each cel in rng
if f.countif(rng,cel)=1 and cel<>"" then
cel = ""
end if
next
end sub