在一张工作薄有多个sheet,如何把列中相同的标出来,
请教,小弟有一个工作薄,内有多个sheet,格式完全相同,如何对多个sheet的B列进行比较,把相同的单元格在每个sheet中标注出来。谢谢!
[解决办法]
Dim sheetcount As Integer
Dim sheetnames() As String
Dim i As Integer
Dim j As Integer
sheetcount = ActiveWorkbook.Sheets.Count
ReDim sheetnames(1 To sheetcount)
For i = 1 To sheetcount
sheetnames(i) = ActiveWorkbook.Sheets(i).Name
Next i
For i = 1 To sheetcount-1
for j = i+1 To sheetcount
if (sheetnames(i) = sheetnames(j))then
msgbox sheetnames(i)
Next i
手写的哦,可能有一点点问题。自己调试下