savage500 wrote:
沒是我看完VBA了...(恕刪)
舉例如下,要多少季的資料頁都可以加,舉例多加一季,放在Sheet7
'新增Sheet7
'--------在資料庫中將搜尋到的資料標上黃底色
If InStr(Sheet5.Cells(i, "C"), Sheet6.Cells(4, 1)) Then
Sheet5.Rows(i).Interior.Color = RGB(255, 255, 0)
If InStr(Sheet7.Cells(i, "C"), Sheet6.Cells(4, 1)) Then
Sheet5.Rows(i).Interior.Color = RGB(255, 255, 0)
'---------資料庫中搜尋關鍵字---------
'新增Sheet7
'Sheet7中搜尋資料
If InStr(Sheet5.Cells(i, "C"), Sheet6.Cells(4, 1)) Then
For kk = 1 To 30
Sheet23.Cells(j, kk) = Sheet5.Cells(i, kk)
Next
j = j + 1
End If
'--------------清除關鍵字上色
'新增Sheet7
Sheet7.Select
ActiveSheet.Range("A1:AA5000").Select
Selection.Interior.ColorIndex = xlNone