Sub 筛选能被5整除的数() Dim a%, b% Dim fg As Range For Each fg In ThisWorkbook.Sheets("sheet1").[a1:d3] 'a1:d3是随便写的数字区域 你可以根据自己实际需要更改 a = fg.Value If a Like "*5" Or a Like "*0" Then b = b + 1: ThisWorkbook.Sheets("sheet2").Cells(b, 1) = a Else End If Next End Sub