End Sub
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) If Target.Column = 1 Then Dim j As Integer For j = 3 To 155 If Cells(j, 1).Value = "" Then Cells(j, 1).Value = Cells(j - 1, 1).Value // 让后一行单元格等于上一行单元格的值 End If Next End If If Target.Column = 4 Then Dim i As Integer For i = 1 To 155 Cells(i, 4).Value = Cells(i, 4).Value Next End If End Sub
此代码执行结果就是将单元格左上角的三角符号去掉(在设置单元格为数值不起作用的时候)。
打开代码编辑器快捷键 ALT+F11