vba 常用函数

=IF(COUNTIF(B:B,A1)>0,A1,"")

公式说明:B列的数据中如果含有A1,显示A1单元格内容,否则显示空白。

 

-------a列,填写内容的最后一行

endRow = Sheet24.Range("a65536").End(xlUp).Row

----取sheet最后一行,包括格式,

Sheet1.UsedRange.Rows.Count

-----弹出窗口

 MsgBox shtMessage.Range("B5").Value, vbExclamation

posted @ 2017-07-25 15:31  屎壳螂  阅读(492)  评论(0)    收藏  举报