返回列表 上一主題 發帖

參照最後一個註解

回復 9# myleoyes
  1. Sub Ex()
  2.      Dim C%, Note As Range, Text As Range
  3.      C = Month(Date) * 3
  4.      With Sheet1
  5.         Set Text = .Cells(Rows.Count, C).End(xlUp).Offset(1)
  6.         On Error Resume Next
  7.         Set Note = .Columns(C).SpecialCells(xlCellTypeComments)
  8.         Set Note = Note.Areas(Note.Areas.Count)
  9.         Set Note = Note(Note.Rows.Count).Offset(1)
  10.         If Note Is Nothing Then
  11.             Text.Select
  12.         ElseIf Note.Row > Text.Row Then
  13.             Note.Select
  14.         ElseIf Note.Row < Text.Row Then
  15.             Text.Select
  16.         ElseIf Note.Row = Text.Row Then
  17.             Text.Select
  18.         End If
  19.     End With
  20. End Sub
複製代碼

TOP

        靜思自在 : 生氣,就是拿別人的過錯來懲罰自己。
返回列表 上一主題